The present military build-up in the Gulf would allow the US to mount an attack by the spring. But the sources said that if there was an attack, it was more likely next year, just before Mr Bush leaves office.

Neo-conservatives, particularly at the Washington-based American Enterprise Institute, are urging Mr Bush to open a new front against Iran. So too is the vice-president, Dick Cheney. The state department and the Pentagon are opposed, as are Democratic congressmen and the overwhelming majority of Republicans. The sources said Mr Bush had not yet made a decision. The Bush administration insists the military build-up is not offensive but aimed at containing Iran and forcing it to make diplomatic concessions. The aim is to persuade Tehran to curb its suspect nuclear weapons programme and abandon ambitions for regional expansion.

Robert Gates, the new US defence secretary, said yesterday: "I don't know how many times the president, secretary [of state Condoleezza] Rice and I have had to repeat that we have no intention of attacking Iran."

But Vincent Cannistraro, a Washington-based intelligence analyst, shared the sources' assessment that Pentagon planning was well under way. "Planning is going on, in spite of public disavowals by Gates. Targets have been selected. For a bombing campaign against nuclear sites, it is quite advanced. The military assets to carry this out are being put in place."

He added: "We are planning for war. It is incredibly dangerous."

Deployment

Mr Cannistraro, who worked for the CIA and the National Security Council, stressed that no decision had been made.

Last month Mr Bush ordered a second battle group led by the aircraft carrier USS John Stennis to the Gulf in support of the USS Eisenhower. The USS Stennis is due to arrive within the next 10 days. Extra US Patriot missiles have been sent to the region, as well as more minesweepers, in anticipation of Iranian retaliatory action.

In another sign that preparations are under way, Mr Bush has ordered oil reserves to be stockpiled.

The danger is that the build-up could spark an accidental war. Iranian officials said on Thursday that they had tested missiles capable of hitting warships in the Gulf.

Colonel Sam Gardiner, a former air force officer who has carried out war games with Iran as the target, supported the view that planning for an air strike was under way: "Gates said there is no planning for war. We know this is not true. He possibly meant there is no plan for an immediate strike. It was sloppy wording.

"All the moves being made over the last few weeks are consistent with what you would do if you were going to do an air strike. We have to throw away the notion the US could not do it because it is too tied up in Iraq. It is an air operation."

One of the main driving forces behind war, apart from the vice-president's office, is the AEI, headquarters of the neo-conservatives. A member of the AEI coined the slogan "axis of evil" that originally lumped Iran in with Iraq and North Korea. Its influence on the White House appeared to be in decline last year amid endless bad news from Iraq, for which it had been a cheerleader. But in the face of opposition from Congress, the Pentagon and state department, Mr Bush opted last month for an AEI plan to send more troops to Iraq. Will he support calls from within the AEI for a strike on Iran?

Josh Muravchik, a Middle East specialist at the AEI, is among its most vocal supporters of such a strike.

"I do not think anyone in the US is talking about invasion. We have been chastened by the experience of Iraq, even a hawk like myself." But an air strike was another matter. The danger of Iran having a nuclear weapon "is not just that it might use it out of the blue but as a shield to do all sorts of mischief. I do not believe there will be any way to stop this happening other than physical force."

Mr Bush is part of the American generation that refuses to forgive Iran for the 1979-81 hostage crisis. He leaves office in January 2009 and has said repeatedly that he does not want a legacy in which Iran has achieved superpower status in the region and come close to acquiring a nuclear weapon capability. The logic of this is that if diplomatic efforts fail to persuade Iran to stop uranium enrichment then the only alternative left is to turn to the military.

Mr Muravchik is intent on holding Mr Bush to his word: "The Bush administration have said they would not allow Iran nuclear weapons. That is either bullshit or they mean it as a clear code: we will do it if we have to. I would rather believe it is not hot air."

Other neo-cons elsewhere in Washington are opposed to an air strike but advocate a different form of military action, supporting Iranian armed groups, in particular the Mujahideen-e Khalq (MEK), even though the state department has branded it a terrorist organisation.

Raymond Tanter, founder of the Iran Policy Committee, which includes former officials from the White House, state department and intelligence services, is a leading advocate of support for the MEK. If it comes to an air strike, he favours bunker-busting bombs. "I believe the only way to get at the deeply buried sites at Natanz and Arak is probably to use bunker-buster bombs, some of which are nuclear tipped. I do not believe the US would do that but it has sold them to Israel."

Opposition support

Another neo-conservative, Meyrav Wurmser, director of the centre for Middle East policy at the Hudson Institute, also favours supporting Iranian opposition groups. She is disappointed with the response of the Bush administration so far to Iran and said that if the aim of US policy after 9/11 was to make the Middle East safer for the US, it was not working because the administration had stopped at Iraq. "There is not enough political will for a strike. There seems to be various notions of what the policy should be."

In spite of the president's veto on negotiation with Tehran, the state department has been involved since 2003 in back-channel approaches and meetings involving Iranian officials and members of the Bush administration or individuals close to it. But when last year the Iranian president, Mahmoud Ahmadinejad, sent a letter as an overture, the state department dismissed it within hours of its arrival.

Support for negotiations comes from centrist and liberal thinktanks. Afshin Molavi, a fellow of the New America Foundation, said: "To argue diplomacy has not worked is false because it has not been tried. Post-90s and through to today, when Iran has been ready to dance, the US refused, and when the US has been ready to dance, Iran has refused. We are at a stage where Iran is ready to walk across the dance floor and the US is looking away."

He is worried about "a miscalculation that leads to an accidental war".

The catalyst could be Iraq. The Pentagon said yesterday that it had evidence - serial numbers of projectiles as well as explosives - of Iraqi militants' weapons that had come from Iran. In a further sign of the increased tension, Iran's main nuclear negotiator, Ali Larijani, cancelled a visit to Munich for what would have been the first formal meeting with his western counterparts since last year.

If it does come to war, Mr Muravchik said Iran would retaliate, but that on balance it would be worth it to stop a country that he said had "Death to America" as its official slogan.

"We have to gird our loins and prepare to absorb the counter-shock," he said.

War of words

"If Iran escalates its military action in Iraq to the detriment of our troops and/or innocent Iraqi people, we will respond firmly"

George Bush, in an interview with National Public Radio

"The Iranians clearly believe that we are tied down in Iraq, that they have the initiative, that they are in position to press us in many ways. They are doing nothing to be constructive in Iraq at this point"

Robert Gates

"I think it's been pretty well-known that Iran is fishing in troubled waters"

Dick Cheney

"It is absolutely parallel. They're using the same dance steps - demonise the bad guys, the pretext of diplomacy, keep out of negotiations, use proxies. It is Iraq redux"

Philip Giraldi, a former CIA counter- terrorism specialist, in Vanity Fair, on echoes of the run-up to the war in Iraq

"US policymakers and analysts know that the Iranian nation would not let an invasion go without a response. Enemies of the Islamic system fabricated various rumours about death and health to demoralise the Iranian nation, but they did not know that they are not dealing with only one person in Iran. They are facing a nation"

Iranian supreme leader Ayatollah Ali Khamenei