Iran has struck a historic deal with the United States and five other world powers agreeing to a temporary freeze of its nuclear programme, in the most significant agreement between Washington and Tehran in more than three decades of estrangement.

Iranian President Hassan Rouhani endorsed the agreement, which commits Iran to curbing its nuclear activities for six months in exchange for limited and gradual sanctions relief, including access to $4.2 billion (£2.5bn) from oil sales. The six-month period will give diplomats time to negotiate a more sweeping agreement.

It builds on the momentum of the public dialogue opened during September's annual UN gathering, which included a 15-minute phone conversation between US President Barack Obama and moderate-leaning Mr Rouhani, who was elected in June.

The package includes freezing Iran's ability to enrich uranium at a maximum 5% level, which is well below the threshold for weapons-grade material and is aimed at easing concerns that Tehran could one day seek nuclear arms.

Mr Obama hailed the pact's provisions as key to preventing Iran from becoming a nuclear threat. "Simply put, they cut off Iran's most likely paths to a bomb," he said.

Prime Minister David Cameron said the deal "demonstrates how persistent diplomacy and tough sanctions can together help us to advance our national interest."

However, Israel's prime minister Benjamin Netanyahu criticised the deal as a "historic mistake", saying the international community had given up too much to Iran, and UK Foreign Secretary William Hague acknowledged there were still "legitimate concerns" about Iran's nuclear programme.

Mr Hague was speaking after Israel condemned the interim deal. He insisted that the "first step deal" should "give us faith in the power of diplomacy" following a change in Iran's attitude.

Speaking to his cabinet, Mr Netanyahu said was Israel not bound by the deal and - in a reference to possible military action against Iran - reserved the right to defend itself.

"Today the world became a much more dangerous place because the most dangerous regime in the world made a significant step in obtaining the most dangerous weapons in the world," he said.

Mr Hague told BBC Radio 4's World This Weekend he understood the scepticism of Israel and Saudi Arabia about Iran's commitment to the process.

He said: "They do all have very legitimate concerns about Iran's nuclear programme and it's not surprising that people will be sceptical about any agreement.

"After all, Iran also has a history of not revealing the truth about its nuclear programme to the rest of the world.

"But this is the first time that Iran has entered into an agreement with other nations, with the international community, about what to do about its nuclear programme."

For Iran, keeping the enrichment programme active was a critical goal. Iran's leaders view the country's ability to make nuclear fuel as a source of national pride and an essential part of its nuclear self-sufficiency.

Giving up too much on the enrichment programme would have likely brought a storm of protest by Iranian hard-liners, who were already uneasy over the marathon nuclear talks and Mr Rouhani's outreach to Washington.

In a nationally broadcast speech, Mr Rouhani said the accord recognises Iran's "nuclear rights" even if that precise language was kept from the final document because of Western resistance.

"No matter what interpretations are given, Iran's right to enrichment has been recognised," said Mr Rouhani, who added that "trust is a two-way street".