With a deadline looming for Iran and the west to seal a comprehensive agreement to resolve a decade-long confrontation over Tehran's nuclear programme, five key issues remain to be resolved.

Enrichment

The biggest obstacle to a deal is the fundamental question of how big the Iranian nuclear programme should be. The key issue here is the country's capacity to enrich uranium. The six world powers negotiating with Iran in Vienna want Tehran to be satisfied with a research-scale capability involving a few thousand centrifuges, so less than its current capacity of 19,000 centrifuges, of which 10,000 are spinning. It is a critical issue because the smaller the capacity the longer the "breakout time", the period it would take Iran to make a bomb, if Tehran took that decision. So the smaller the capacity, the greater confidence the rest of the world would have that it would have more than six months warning that Iran was making a dash to a warhead.

The Iranians say such a limit would be a violation of Iran's right to pursue a peaceful nuclear programme, including producing fuel for its own reactors. The supreme leader, Ali Khamenei, declared recently that Iran would need a capacity equivalent to over 200,000 of the old-model centrifuges it is currently using, in order to supply fuel to its nuclear power station in Bushehr, a research reactor in Tehran, and a new reactor under construction in Arak. Western diplomats point out the Russians have a contract to supply Bushehr with its fuel rods until 2021 at least, and it would be dangerous for everyone in the Gulf region if Iran tried to use domestically-made rods. Russian warranties on the reactor would no longer apply. Iran counters that the lesson it has drawn from the history of its nuclear programme is not to rely on foreign governments.

This will be the hardest divide to bridge, not least because Khamenei has publicly made it a matter of national pride. One possibility is a phased solution in which there is an agreed low ceiling for enrichment for a few years, and later expansion is dependent on proven need and high marks for transparency from the International Atomic Energy Agency (IAEA). Another is for Russia to provide several years' fuel for Bushehr in advance, to overcome any doubt over reliability of supply, and the stockpile would be stored in Iran under IAEA safeguards.

Arak

For more than 12 years, Iran has been building a heavy water reactor in Arak, which is now close to completion. Officially it is for the production of isotopes for various industrial, agricultural, medical and other scientific uses. Western sceptics point out the planned reactor is more powerful than would be needed for such uses. They believe it is for the production of plutonium, another route to make a bomb, which is created as part of the spent fuel.

Iran refuses to scrap the project, saying it has invested a lot of time and money in it, building a heavy water production plant nearby. But this could be a relatively easy issue to fix. A change in design would mean it would produce less than 1kg of plutonium a year, rather than the 9kg expected from the existing blueprint, which would be nearly enough for two warheads. Iran would undertake not to build a reprocessing facility for extracting the plutonium, which would be exported as part of the spent fuel. Iran officials have said they are already working in that direction.

Past weaponisation work

The question of whether Iran had a large-scale programme to develop technologies for making a warhead, at least until 2003 as most western intelligence agencies believe, has not been resolved. For many years, IAEA inspectors have been presenting a shopping list of requests to see documents, interview scientists, and visit suspects sites, but have made little progress.

The matter is being dealt with outside the main talks, in a series of meetings and visits between IAEA and Iranian officials, but the two issues are inevitably linked. It would be hard to imagine a comprehensive deal on Iran's programme without the questions about the past development work being settled, as it concerns the fundamental issue of whether the international community trusts Iran to be transparent about its nuclear activities.

The big short-term problem is how to dovetail the two negotiating tracks: the six powers and the IAEA, so the latter does not become an obstacle to the former.

Oversight

Long-term increased scrutiny by IAEA inspectors would have to be part of any nuclear deal. At a minimum, this would involve a regime of enhanced inspections which the IAEA calls the "additional protocol". This would involve access by inspection teams to all parts of the nuclear cycle, from uranium mining onwards, and would allow them to take environmental samples anywhere they deem fit. Most western diplomats say they will demand a programme of even more intrusive inspections, "additional protocol plus". The Iranians may balk at this, as their touchstone is to be treated like any other state. However, it is possible to envisage an intense period of inspections and monitoring that would diminish over the time, as mutual confidence between the parties grows.

Sanctions

Sanctions relief is the main bargaining chip the six powers have in their hands at the negotiating table, and it is one of the thorniest issues, because having placed sanctions on Iran, western governments are going to find it hard to take them off. Over the years, the US and EU have gone beyond measures agreed at the UN, and built up a tangle of interlocking and overlapping punitive restrictions on doing business with Iran. The most serious constraint on sanctions relief is that the Obama administration does not have it in its gift to permanently lift sanctions. Only Congress can do that, and Republican legislators are no mood to cooperate. The president can grant temporary waivers but that does not impress the Iranians, who are wary of being tricked. The EU could lift its oil embargo and financial restrictions, but only if there is consensus.

Buying Iranian oil and gas would go a long way towards rescuing the country's economy, as would allowing insurance of Iranian shipping, and unfreezing an estimated $100bn in Iranian oil revenues held abroad. The problem of US sanctions and Congress could be sidestepped because some of the American sanctions have a sunset clause that means they lapse next year anyway.