Classified war games conducted by the Pentagon have sketched a scenario in which an attack by Israel on Iran's suspected nuclear facilities would lead to Tehran launching a counter-strike against a US ship in the Gulf. That in turn would drag a reluctant US into a fresh war in the Middle East.

The results of the simulation, meant primarily to test co-ordination and communications between the various arms of the US military in the event of a flare-up with Iran, were reported by The New York Times.

The revelations came as Iran's supreme leader, Ayatollah Ali Khamenei, warned yesterday that Tehran would attack any enemy "on the same level" as it attacks Iran. He named both Israel and the US as enemies, in remarks on state television.

The war games were completed earlier this month under a long-standing programme called Internal Look to test the readiness of the Pentagon, Central Command in Florida and military resources in the Middle East to respond to any fallout from an Israeli strike.

That fallout, the simulation showed, might include the Iranian leadership reasoning that any Israeli incursion would have come with an American stamp of approval and would justify a counter-strike against a US target. Under that scenario, Tehran would hit a US Navy vessel in the Gulf with the loss of 200 or more American lives. At that point, the US would feel bound to retaliate. The top military commander in the Gulf, the Middle East and Southwest Asia, General James Mattis, is reportedly using these results to underscore his belief that any attempt by Israel to take out Iran's nuclear facilities could lead to a potentially disastrous conflagration.

Yesterday, President Barack Obama sent a message to Iranians celebrating New Year, or Nowruz, saying he hoped to bridge divides with their country. "America seeks a dialogue to hear your views and understand your aspirations," he said, calling on the regime in Tehran to respect human rights. During a visit to Washington last week by David Cameron, the President conceded that the US military was engaged in contingency planning with regard to Iran. But he underscored that the Pentagon has a responsibility to prepare for any eventuality and it did not follow that the US expected war with Iran.

Mr Obama has said repeatedly that the "military option" is on the table if diplomatic efforts to resolve the nuclear stand-off with Iran fail. Recently Iran agreed to resume talks with the permanent five UN Security Council members, plus Germany, to try to resolve the dispute.

Washington has no appetite for a new war in the region and would prefer to rein in Iran through tougher sanctions and at the negotiating table. But Mr Obama may find himself hostage to the intentions of Israel, which believes more strongly than the US that the window for sanctions to work is narrowing quickly. Any daylight between Mr Obama and Israel could be costly for him in an election year.