Iranian official on deal: It only depends on political will

Vienna (CNN)World powers are on the verge of a historic deal with Iran, according to Western diplomats, though Iran officials caution against the idea that outcome is a foregone conclusion.

The Western diplomats say the major hurdles to a deal have been overcome, although they acknowledge some important issues needed to be resolved and capitals still needed to sign off. Those loose ends are what are keeping Iranian officials from sounding more optimistic, with a Monday deadline looming.

“There are two or three things that need to be worked out,” a senior Iranian official told CNN on Sunday.

But if all goes well, an announcement to come as early as Monday, Western officials said.

“We are nearly there,” one Western diplomat said.

RELATED: Understanding the U.S. talking points on the Iranian nuclear deal

Another said negotiators made good progress over the weekend and the talks were reaching the “endgame.”

The Iranian official said whether or not a deal gets struck hinges on the negotiators’ appetite for getting it done.

“It only depends on political will,” the official told CNN.

Secretary of State John Kerry on Sunday said he is “hopeful” about the U.S. and the other world powers being able to reach a deal with Iran to curb its nuclear program.

This followed a marathon series of meetings in Vienna on Saturday, including two sessions with the 6 allies and Iran — one going to midnight. There were also separate sessions on Saturday between Kerry, European Union foreign policy chief Federica Mogherini and Iranian Foreign Minister Javad Zarif.

“We had a very good meeting. Positive,” Kerry told reporters on Sunday of the previous day’s meeting with Zarif. “I think we’re getting to some real decisions so I will say — because we have a few tough things to do. I remain hopeful. Hopeful,” he said.

The negotiators, facing another deadline, on Friday extended the talks through Monday. This was the third extension of the final round. The parties also extended the interim agreement, known as the Joint Plan of Action, through Monday.

On Saturday, after one of his meetings with the European negotiator and the Iranian Foreign Minister, Kerry tweeted “Still have difficult issues to resolve.”

Met with @FedericaMog and @JZarif this AM. Still have difficult issues to resolve.