VIENNA — U.S. Secretary of State John Kerry said Sunday that Iran and the U.S. have made "genuine progress" on a nuclear agreement, but added that there are several difficult issues to resolve.

Speaking at a press conference, Kerry said Washington is ready to walk away from the talks if need be.

"We have in fact made genuine progress but ... we are not yet where we need to be on several of the most difficult issues," he said. "If we don't have a deal and there is absolute intransigence and unwillingness to move on the things that are important President Obama has always said we're prepared to walk away."

The foreign ministers of the six world powers are scheduled to arrive in Vienna on Sunday evening.

Meanwhile, as the latest round of talks on Iran's nuclear program enters its 13th day, the country's leaders have started trying to convince Iranians that the deal is a good one.

On Sunday, Iranian Foreign Minister Mohammad Javad Zarif met with his American counterpart, U.S. Secretary of State John Kerry, as the marathon negotiations between the P5+1 powers and Tehran continued.

The main obstacles remained Iran’s objections to “invasive” supervision of its nuclear facilities and its demands for commitments to lift all sanctions as soon as possible. The negotiators are expected to need all the allotted time until the Tuesday-night deadline.

But a major revelation happened Saturday night when Iranian Deputy Foreign Minister Abbas Araghchi told Iranian TV the two sides were very close to agreeing on wording.

From Araghchi’s statements, it seems final approval will not happen this week but will be done in three stages. Other officials in Vienna have made similar statements: The current round of talks would end with an “adoption of the agreement” but probably without a formal signing.

That stage would last about two months, during which the U.S. Senate and Iranian parliament would consider and vote on the deal. (It seems a veto from U.S. President Barack Obama would be needed to overcome Republican opposition in the Senate.)

During the next stage, the Iranians would have to let inspectors from the International Atomic Energy Agency confirm that Tehran was keeping to the deal and had halted its nuclear program for possible military purposes. Only at the end of this process, probably toward the end of this year, would the agreement officially take effect.

This framework is meant to meet a central requirement that Iranian Supreme Leader Ayatollah Ali Khamenei raised two weeks ago: The economic sanctions on Iran must be lifted immediately upon the signing of the agreement.

The fact that Araghachi has already provided details stems from President Hassan Rohani’s need get public opinion on his side against objections by conservatives.

The Obama administration, meanwhile, is expected to run into objections mostly in the Senate and is trying to moderate expectations. It has told reporters that only a draft is being negotiated by experts, with nothing so far agreed on by the foreign ministers.

This was the response put out by the administration Saturday, when the news broke of agreements to establish a committee to discuss possible violations by Iran, and the possibility of restoring sanctions.

To reach a deal, the parties still need to craft the details on lifting the sanctions and agree on procedures for supervising and inspecting Iran’s nuclear facilities. These two issues could still cause big problems, with the Iranians demanding more detailed commitments on removing sanctions while trying to soften the inspection procedures.

Any wording needs the approval of all six countries taking part in the negotiations — the five permanent members of the UN Security Council plus Germany. French Foreign Minister Laurent Fabius is seen as the biggest hawk in the talks, someone who will demand significant commitments for supervision and inspection.

During a visit to Israel last month, Fabius said that only a serious inspection regime could prevent countries such as Saudi Arabia and Egypt from developing nuclear weapons of their own.