US Iran Nucelar deal in Vienna
US Secretary of State John Kerry meeting with Iranian Foreign Minister Mohammad Javad Zarif Carlos Barria/Reuters

President Barack Obama is optimistic about securing a historic nuclear deal with Iran, despite fear that lifting sanctions on Tehran could possibly lead to increased terrorism throughout the Middle East.

Iran, the US and six other world powers, have reached a framework agreement to curb Iran's nuclear programme in exchange for the lifting sanctions – a step towards a comprehensive accord that could end a 12-year stand-off.

The framework has yet to be approved by senior officials of the nations involved – which includes US Secretary of State John Kerry, Iranian Foreign Minister Mohammad Javad Zarif and the foreign ministers of Britain, China, France, Germany and Russia.

The leaders of these nations are meeting in Vienna this weekend, to meet a deadline to form a deal on 7 July, but they want assurance that Iran will not be able to make a nuclear weapon in less than a year.

The agreement is said to be Obama's way of carving his place in history by making a landmark change in foreign policy.

Obama believes this move could be a "bulwark against Isis in the Middle East and a key to peace there", according to an American diplomat involved in the negotiations told the Sunday Times.

In a YouTube video Javad Zarif, Iran's foreign minister, says that an agreement over its nuclear programme would open new ways to address common challenges – such as extremism – in the Middle East.

"The menace we're facing, and I say we, because no-one is spared, is embodied by the hooded men who are ravaging the cradle of civilisation. To deal with this new challenge, new approaches are badly needed," he said.

Iran says it does not want to build nuclear weapons, but insists on exercising its right to run a peaceful nuclear industry, and wants crippling international sanctions lifted quickly.

Iran's Message: Our Counterparts Must Choose Between Agreement and CoercionIran foreign minister Javad Zarif

Critics of the deal believe that lifting sanctions and granting Iran access to $150bn (£96bn) of assets would intensify Iranian aggression from Yemen to Lebanon and Bahrain, and could allow Tehran to increase support for Hamas and Hezbollah.

Some countries do not believe Iran's declared intentions, and are frightened of the a nuclear arms race beginning in one of the world's most unstable regions.

The deadline for reaching a comprehensive agreement on Tehran's nuclear programme has been extended from the 30 June.

In the US, President Barack Obama has until 9 July to submit details of a final accord to Congress, triggering a 30-day review period before it can be signed and any US sanctions waived.

If a deal is submitted after 9 July, the review period will be doubled to 60 days.