With an election coming and the economy struggling, conflict may not appeal to Obama, but the drumbeat is getting louder

War with Iran is the last thing Barack Obama needs with the American economy in dire trouble and a tough White House election campaign looming next year, according to officials in Washington as well as political analysts.

But while the Obama administration is desperate to avoid another conflict – it would be America's fourth in a decade – the drumbeat from Israel has been growing louder.

The Israeli cabinet was reported on Wednesday to be debating whether to launch air strikes on Iranian nuclear sites in the coming weeks. The prime minister, Binyamin Netanyahu, and the defence minister, Ehud Barak, are lobbying in favour of action, but other senior ministers are urging caution.

In response, Iran has warned, as it has in the past, that any attack by Israel would result in retaliation against the US. The Iranian news agency ISNA quoted Hassan Firouzabadi, Iran's military chief, as saying: "The Zionist regime's military attack against Iran will inflict heavy damages to the US as well as the Zionist regime."

The rhetoric from Tel Aviv and Tehran is making some within the Obama administration nervous.

A Washington official familiar with the issue acknowledged the temperature has been rising and that Israel introduced an unpredictable element. He reiterated, however, that the policy of the Obama administration was to pursue all diplomatic channels, backed by tougher sanctions, and avoid military action.

"I do not think the US has the stomach for it," Sam Gardiner, a retired air force colonel who taught strategy at the National War College and who has specialised in carrying out war games targeting Iran, said. But if Israel went ahead, it would be difficult for the US to stay out. "The US would have to be involved and finish it," he said.

A congressional hearing on Iran last week was told that the Pentagon has a series of contingency plans for military action, ranging from all-out war to limited operations. Obama had signed off on these, the hearing was told.

Retired general Jack Keane was hawkish, urging escalation. "We've got to put our hand around their throat now," he said. The hearing was told options included increased covert action, more cyberwarfare and sanctions that would target the Iranian central bank, a serious move that Iran might regard as tantamount to a declaration of war.

But Keane and other military colleagues giving evidence on Capitol Hill all stopped short of advocating an air strike against Iran. That has been line for years from the Pentagon, which sees all-out war against Iran as the worst of options.

The issue of a possible military attack on Iran was reignited in Israel by influential columnist Nahum Barnea last Friday. "Rumours are increasing about an Israeli offensive that would change the face of the Middle East and perhaps seal the fate of the Jewish state for the coming generations," he wrote.

Members of the inner cabinet swiftly tried to put a lid on conjecture. The intelligence affairs minister and deputy prime minister, Dan Meridor, said the issue should not be a matter of public debate. "A public debate about this is nothing less than a scandal … The public elected a government to make decisions about things like this in secret. The public's right to know does not include the debate about classified matters like this," he said.

Israel test-fired a "rocket propulsion system" capable of striking Iran on Wednesday, adding to speculation over its intentions regarding military action. However, defence officials said the exercise had been planned for a long time.

With the next White House election 13 months away, an Israeli attack on Iran is Obama's nightmare. It would be hard for a president to sell another conflict to a war-weary American public on top of Iraq, Afghanistan and Libya.

There might be a temporary rallying round the flag but Obama would lose the Democratic left, the base he needs to get out and campaign for him.

That would be problematic for a president facing a tight election. But there is an even bigger problem: the impact of rising oil prices – an almost certain consequence of conflict – on the faltering US recovery.

Karim Sadjadpour, one of the leading analysts in the US on relations with Iran, based at the Washington-based Carnegie Endowment for International Peace, is sceptical about the chances of war with Iran.

"A US military attack on Iran is not going to happen during Obama's presidency. If you're Obama, and your priority is to resuscitate the American economy and decrease the US footprint in the Middle East, bombing Iran would defeat those two objectives. Oil prices would skyrocket."

Larry Sabato, a widely-respected political analyst and professor of politics at the University of Virginia, shared the scepticism, though he noted that Obama was more bellicose than people had expected. "He has not been hesistant to use force. And that has surprised not just the left but people round the world. I am not sure he would get the Nobel peace prize now. Just as well he got it early," he said.

If there was to be a conflict, it would be better late next year, close to the election, rather than during the remainder of this year or early next. "We always talk about October surprises and we would have people rallying round the flag if there was sufficient justification. October means the election would be held before the US becomes mired down in conflict or faces a boomerang effect," Sabato said.

Israel is not alone in talking about military action against Iran. Among the state department documents disclosed by WikiLeaks was one in Saudi Arabia called for action to chop what it called "the head of the snake".

The attitude of the Obama adminstration towards Iran is well illustrated by the episode in which allegations surfaced of an Iranian plot to assassinate the Saudi ambassador to Washington with the help of a Mexican drug cartel.

If the US was finally bowing to pressure from not just Israel but Saudi Arabia, the alleged Iranian plot would have been a useful casus belli or at least the start of a softening up process in preparation for war.

Instead, Obama administration staff briefed privately almost immediately that a military response was not being contemplated, not even sending more naval vessels to the Gulf or announcing new military manoeuvres in the region.