VIENNA -- Negotiators at the Iran nuclear talks could reach a provisional agreement Sunday on a historic deal capping nearly a decade of diplomacy that would curb the country's atomic program in return for sanctions relief, diplomats told The Associated Press.
The two diplomats cautioned that final details of the pact were still being worked out and a formal agreement still awaits a review from the capitals of the seven nations at the talks. They said plans now are for the deal to be announced on Monday.
Senior U.S. and Iranian officials, however, cast doubt on the timing. All of the officials, who are at the talks, demanded anonymity because they weren't authorized to discuss the negotiations publicly.
"We are working hard, but a deal tonight is simply logistically impossible," the Iranian official said, noting that the agreement will run roughly 100 pages.
The senior U.S. official declined to speculate as to the timing of any agreement or announcement and noted that "major issues remain to be resolved in these talks."
Movement toward a deal has been marked by years of tough negotiations. The current round in Vienna has run more than two weeks and blown through three deadlines.
Even before the envoys spoke to the AP, the nuclear negotiations appeared on the way to an agreement.
U.S. Secretary of State John Kerry, who on Thursday had threatened to walk away from the negotiations, noted Sunday that "a few tough things" remain in the way but added "we're getting to some real decisions."
En route to Mass at Vienna's gothic St. Stephens Cathedral, Kerry said twice he was "hopeful" after a "very good meeting" Saturday with Iranian Foreign Minister Mohammad Javad Zarif, who had Muslim services Friday.
French Foreign Minister Laurent Fabius also was cautiously optimistic, telling reporters Sunday: "I hope that we are finally entering the last phase of this negotiation."
The pact is meant to impose long-term, verifiable limits on nuclear programs that Tehran could modify to produce weapons. Iran, in return, would get tens of billions of dollars in sanctions relief.
The current round of nuclear talks is now in its 16th day and has been extended three times since the first deadline of March 31 was missed. The mood among negotiators had turned more somber each time a new target date was set.
As the weekend approached, Kerry declared the talks couldn't go on indefinitely and warned that the U.S. could walk away from the negotiations.
But in another sign that a deal could soon be sealed, Russian news agencies reported that Russian Foreign Minister Sergey Lavrov planned to arrive in Vienna on Sunday evening.
Most other foreign ministers of the six nations negotiating with Iran already are in the Austrian capital and in position to join Kerry and Zarif for any announcement of an agreement.
Diplomats familiar with the talks said most of the nuts and bolts of implementing the deal have been agreed upon. But over the past week, issues that were previously on the back burner have led to new disputes. Among them is Iran's demand for a lifting of a U.N. arms embargo and its insistence that any U.N. Security Council resolution approving the deal be written in a way that stops describing its nuclear activities as illegal.
A diplomat familiar with the negotiations said disagreements also persist on how long some of the restrictions on imports of nuclear technology and other embargos outlined in any new Security Council resolution will last. The diplomat, who demanded anonymity because the diplomat wasn't allowed to discuss the confidential talks, said restrictions will last for years, not months.
Despite Kerry's relatively upbeat take, comments by Iran's supreme leader suggested that Tehran's mistrust of Washington would persist no matter what the outcome of the talks.
Iran's state-run Press TV cited Ayatollah Ali Khamenei on Saturday as calling the U.S. an "excellent example of arrogance." It said Khamenei told university students in Tehran to be "prepared to continue the struggle against arrogant powers."
Even if Khamenei isn't signaling that the talks have failed, his comments appeared to be a blow to U.S. hopes that an agreement will lead to improved bilateral relations that could translate into increased cooperation in a common cause- the fight against Islamic State radicals.
Zarif had hinted at just that last week, suggesting a deal acceptable to his country will open the door to joint efforts on that front.
Israeli Prime Minister Benjamin Netanyahu, a fierce opponent of what he considers a deal that is too lenient on Tehran, said Khamenei's comments showed that Western powers are "caving" in to Iran even as the Islamic republic keeps railing against them.