VIENNA -- Nine days into marathon nuclear talks, U.S. Secretary of State John Kerry on Sunday said the diplomatic efforts "could go either way," cutting off all potential pathways for an Iranian atomic bomb or ending without an agreement that American officials have sometimes described as the only alternative to war.

The EU's top foreign policy official, Federica Mogherini, said agreement was "very close." But Kerry said there was still a ways to go.

"We are not yet where we need to be on several of the most critical issues," Kerry told reporters outside the 19th-century Viennese palace that has hosted the negotiations.

World powers and Iran are hoping to clinch a deal by Tuesday, setting a decade of restrictions on Iran's nuclear program and granting Iran significant relief from international sanctions. Kerry met for 3 1/2 hours on Sunday with Iranian Foreign Minister Mohammad Javad Zarif, as top diplomats from the five other negotiating countries planned to return to Austria's capital later in the evening.

"It is now time to see whether or not we are able to close an agreement," Kerry said, after hobbling on crutches through 97-degree heat to a podium set up in a city square.

While "genuine progress" had been made and the sides "have never been closer, at this point, this negotiation could go either way. If the hard choices get made in the next couple of days, and made quickly, we could get an agreement this week," Kerry said. "But if they are not made, we will not."

The talks had appeared to be moving forward. On Saturday, diplomats reported tentative agreement on the speed and scope of sanctions relief for Iran in the accord, even as issues such as inspection guidelines and limits on Iran's nuclear research and development remained contentious.

German Foreign Minister Frank-Walter Steinmeier spoke of "sharper" deal contours.

"But that shouldn't deceive us," he said. "There's still a possibility that there will be a lack of courage and readiness in crucial points to build the bridges that we need to find to each other."

Mogherini, formally the convener of the talks between Iran and six world powers, told reporters that as of Monday, foreign ministers and other top diplomats "are here to check and assess if the deal can be closed."

Tuesday's deadline is the latest that has been set for a comprehensive pact that would replace the interim deal world powers and Iran reached in November 2013. That package was extended three times, most recently on June 30, and Kerry appeared to be partly addressing critics of the diplomacy in the United States who've argued that President Barack Obama's administration has been too conciliatory over the course of the negotiations.

Obama and U.S. officials say that is untrue. But they've also fiercely defended their overtures to Tehran and their willingness to allow the Iranians to maintain significant nuclear infrastructure, on the argument that a diplomatic agreement is preferable to military conflict.

Speaking at the same time as Sunday news shows aired in the U.S., Kerry said that "if we don't have a deal, if there's absolute intransigence with the things that are important, President Obama has always said we would walk away."

"It's not what anybody wants. We want to get an agreement," he said. "What I have said from the moment I became involved in this: We want a good agreement, only a good agreement and we are not going to shave anywhere at the margins in order just to get an agreement. This is something that the world will analyze, experts everywhere will look at. There are plenty of people in the nonproliferation community, nuclear experts who will look at this and none of us are going to be content to do something that can't pass scrutiny."

Appearing on a nationally broadcast interview show Sunday, Sen. Bob Corker, chairman of the Foreign Relations Committee, said he had spoken to Kerry Saturday and voiced his concerns about rushing too quickly toward a settlement.

"Well, obviously they're very anxious," the Tennessee Republican said of Obama administration officials. "I mean, I think they look at this as a legacy issue."

"I've had several conversations with him (Kerry) in meetings to say, 'Look, you create just as much as a legacy walking away from a bad deal as you do head-long rushing into breaking into a bad deal," Corker said on CBS' "Face the Nation."

While talks continue in Vienna, Iranian media reported that a high-level delegation from the U.N. nuclear agency would meet senior Iranian officials in Tehran on Sunday night.

------

AP writers Matthew Lee and George Jahn contributed to this report.