Switzerland: Iran and world powers reached a framework agreement on Thursday on curbing Iran's nuclear programme for at least a decade, a step towards a final pact that could end 12 years of brinkmanship, threats and confrontation.

The tentative agreement, after eight days of marathon talks in Switzerland, clears the way for negotiations on a settlement aimed at allaying Western fears that Iran was seeking to build an atomic bomb and in return lift economic sanctions on the Islamic Republic.

The framework is contingent on reaching an agreement by June 30. All sanctions on Iran remain in place until a final deal.

Celebrations erupted in the Iranian capital Tehran. Videos and pictures posted on social media showed cars in Tehran honking horns as passengers clapped. In one video posted on Facebook, a group of women can be heard clapping and chanting "Thank you, Rouhani" in praise of President Hassan Rouhani.

President Barack Obama described the agreement as a "historic understanding with Iran" and compared it to nuclear arms control deals struck by his predecessors with the Soviet Union that "made our world safer" during the Cold War. He also cautioned, however, that "success is not guaranteed."

Many details still need to be worked out. Diplomats close to the negotiations said the deal was fragile. It could not be ruled out that the understandings reached could collapse between now and June 30. Experts believe it will be much harder to reach a final deal that it was to agree the framework accord.

Under the outline deal, Iran would shut more than two-thirds of its installed centrifuges capable of producing uranium that could be used to build a bomb, dismantle a reactor that could produce plutonium, and accept intrusive verification.

The negotiations between Iran and six powers - Britain, China, France, Germany, Russia and the United States - blew past a self-imposed March 31 deadline with no certainty that they would not end in failure.

Iranian Caution

The framework, fiercely opposed by US ally Israel, includes limits on Iran's enrichment of uranium for 10 years.

Iran agreed to significantly reduce the number of installed uranium enrichment centrifuges it has to 6,104 from 19,000 and will only operate 5,060 for 10 years under the future agreement with the six powers, according to a US fact sheet. Iran will only use first generation centrifuges during that time, it said.

One of the most sensitive issues during the negotiations, Iran's research and development work, will also be limited.

"Iran has agreed to not conduct research and development associated with uranium enrichment at Fordow for 15 years," the US fact sheet said. It also noted that Iran will remove the 1,000 more advanced second-generation centrifuges currently installed at Natanz and place them in International Atomic Energy Agency-monitored storage for 10 years.

High enriched uranium can be used to make a weapon, which they aim to prevent, while low enriched uranium is used in power plants. Iran has insisted it wants it only for a peaceful nuclear energy programme and denies it aimed to build an atomic bomb.

Under Thursday's agreement, Iran will gradually receive relief from US and European Union nuclear sanctions if it complies with the terms of a final deal. Some UN Security Council sanctions would be gradually lifted, though others would remain in place, specifically those relating to proliferation.

"We're still some time away from reaching where we want to be," said Iran's Foreign Minister Mohammad Javad Zarif.

Failure to comply with terms of the deal will cause the US and EU sanctions to "snap back into place", the US fact sheet said. It was less specific on UN sanctions, one of the main sticking points in the negotiations, saying only that they could be reimposed in the event of Iranian non-compliance.

US Secretary of State John Kerry told reporters many technical details needed to be worked out, including the possible lifting of a UN arms embargo and the modernization of the Arak heavy-water reactor and Fordow underground sites.

Officials of Gulf Arab states, traditionally wary of Iran, were silent about the deal. A senior Gulf Arab official said any reaction would come in the days ahead, not from individual countries but from the Gulf Cooperation Council, an alliance of Saudi Arabia, Kuwait, the United Arab Emirates (UAE), Qatar, Oman and Bahrain.

Obama called Saudi Arabia's King Salman bin Abdulaziz al-Saud to discuss the deal and invited GCC leaders to Camp David for a summit this spring to discuss Iran.

French President Francois Hollande welcomed the framework but said France must remain "watchful" to ensure a final agreement prevents Iran from having access to nuclear arms, a comment echoed by British Foreign Secretary Philip Hammond.

Russia said the agreement would have a positive impact on the security situation in the Middle East, with Iran be able to take more active part in solving problems and conflicts.

Israel, assumed to have the Middle East's only nuclear arsenal, was not a party to the talks but views Iran as a mortal threat and lobbied vigorously for an uncompromising stand. In a call to Israeli Prime Minister Benjamin Netanyahu, Obama said significant progress had been made toward cutting off Iran's pathways to a nuclear weapon, the White House said.

The talks were the biggest opportunity for rapprochement between Washington and Tehran since they became enemies after Iran's 1979 revolution, but any deal faces scepticism from conservatives in both countries. US allies in the Middle East are also sceptical, including Saudi Arabia.