Negotiators from Iran and six world powers agreed Friday to extend talks over the country’s contested nuclear activities through late November, hoping to secure a deal that would prevent an Iranian nuclear weapon and ease economic sanctions that have hobbled the oil-rich Islamic republic.

As a Sunday deadline loomed, negotiators announced that they were unable to complete the deal now.

“There are still significant gaps on some core issues which will require more time and effort,” European Union foreign policy chief Catherine Ashton and Iranian Foreign Minister Mohammad Javad Zarif said in a joint statement issued in Vienna, where talks have continued on and off since January.

The Iranian diplomat and Ashton, who led negotiations for six world powers, including the United States, cited “tangible progress” and said talks had included work on a draft text for a final agreement.

The new deadline to either complete a final deal or walk away from the landmark effort is Nov. 24. It was not immediately clear when talks would reconvene.

Both sides have said they seek a comprehensive deal that would end the decade-long standoff over Iran’s nuclear program.

“We are committed to testing whether we can address one of the world’s most pressing priorities — ensuring that Iran does not obtain a nuclear weapon,” Secretary of State John F. Kerry said in a statement issued in Washington.

“This effort remains as intense as it is important, and we have come a long way in a short period of time.”

Since the current round of talks began July 2, the prospects of a deal have improved, according to sources close to the negotiations, but a picture of sticking points is emerging that the parties say requires further consultations, especially in Tehran and Washington.

Negotiations have been stuck on the crucial issue of how much of Iran’s current program it would retain. Iran set the preservation of a “robust” uranium enrichment capability as a precondition of any agreement, while the United States and European nations wanted to ensure that Iran was not left with the ability to quickly divert its program for the production of nuclear weapons.

Western diplomats said this week that talks were centered on finding a face-saving way around the impasse, in which Iran would keep part of its capability.Domestic nuclear capability has become a point of national pride, and Iranian leaders insist that they will not forgo a technology widely available to Western nations.

The goal, one diplomat said, is to allow Iranian leaders to claim success while circumscribing Iran’s nuclear abilities to a point that would make a weapon very difficult to manufacture. That diplomat, who demanded anonymity to describe the emerging deal, acknowledged that the likely outcome — if an agreement can be brokered at all — is not an absolute guarantee that Iran will never make a weapon.

U.S. ally Israel and many in Congress are looking for that airtight guarantee, and if negotiators can broker an agreement in November, the Obama administration will have to then sell it to Congress.

Congress would have to approve the lifting of U.S. sanctions on Iran, which is a key goal for Tehran in agreeing to talk at all.

U.S. officials said Iran has kept its commitments under the temporary agreement reached last fall — itself a breakthrough after years of fruitless talks — and that abandoning those gains now would be a huge lost opportunity.

The terms of the temporary agreement, under which Iran’s program was largely capped, will continue during the four-month extension. Iran has received nearly $3 billion in sanctions relief under that agreement but will get no more during the extension, one U.S. official said.

Kerry recommended the extension when he met with President Obama this week, another U.S. official said. Congressional skepticism should be partly assuaged by Iranian performance so far, the official said.

The officials spoke on the condition of anonymity to describe the confidential discussions.

Iran claims its program is peaceful and chiefly aimed at easing future demands for electrical power. The United States and many allies claim the program, begun in secret, was intended to allow Iran to make a weapon when and if it chose as a hedge to what the Islamic republic has long seen as Western desires to overthrow its leadership.

Members of the U.S. negotiating team have quietly acknowledged that their Iranian counterparts showed unprecedented flexibility on a range of limitations that they previously considered red lines. That included the level of uranium enrichment Iran could retain, a key matter since only the most highly enriched uranium can be used for bomb fuel.

“We have a draft text that covers the main issues, but there are still a number of brackets and blank spaces,” Kerry said.

Iranian diplomats say their American negotiating partners are serious about getting a deal, citing Kerry’s involvement in the current round as evidence of U.S. commitment to the process.

Analysts agree that there is an unprecedented show of will from both sides to complete a deal.

“Secretary Kerry was here for three days; Zarif has been here for two weeks. Progress is happening,” said Reza Marashi, research director of the National Iranian American Council.

A year ago, the progress toward a settlement to the issue was difficult to imagine. Election of Hassan Rouhani, a relative moderate, as president and the decision by Iran’s authorities to transfer the handling of the nuclear case from the conservative-dominated Supreme National Security Council to the more pragmatic Foreign Ministry have helped the efforts to find a resolution.

With incentives for American and Iranian diplomats to finalize an agreement, frustration has at times been visible, but no one publicly threatened a walkout.

Gearan reported from Washington.