Istanbul, Turkey
— The drumbeat may sound like a march to conflict between the United States and Iran:

•US commanders are building a small forward base in Iraq – Combat Outpost Shocker, just miles from Iran's border – to stanch what they say is the flow of lethal weaponry that is part of an Iranian "proxy war" against the US.

•Iranian commanders are touting better missile capability and electronic surveillance of the "enemy," and making leadership changes that appear to prepare for a fight.

•And the US Senate last week voted for a resolution to designate Iran's Islamic Revolutionary Guard Corps (IRGC) a "terrorist" group. Iran's parliament reciprocated on Saturday, designating the CIA and US Armyas "terrorists."

But in the wake of President Mahmoud Ahmadinejad's controversial US visit, are signs pointing toward war or diplomacy?

Despite hard-line rhetoric on both sides – and a lengthy story by Seymour Hersh in The New Yorker posted on Sunday that suggests the Bush administration is ready for "surgical strikes" against Iran – analysts say diplomacy is the far more likely outcome.

"I am convinced they have zero interest in a war with Iran," says Kenneth Pollack of the Brookings Institution, who has spent time with key US decisionmakers in recent months and visited Iraq in July. "They are completely fixated on Iraq." The military in Iraq is "apoplectic" about Iran's role, he says, prompting a "steady drumbeat to take stronger and stronger measures against the Iranians."

President Bush said in August he had "authorized" US commanders to "confront Tehran's murderous activities." But few in civilian or Pentagon leadership appear ready for direct military action. The US instead is working for a third round of UN sanctions over Iran's nuclear program, and US and Iranian ambassadors in Baghdad have met three times for talks.

"If ever [US officials] got a smoking gun, where they could directly trace a line between a dead American military person and an Iranian official – my guess is their first inclination would be: 'How do we use this to get the Russians, Chinese, and Europeans to agree to harsher sanctions? How do we use this as leverage to force the Iranians to get serious in these talks?' " says Mr. Pollack, author of "The Persian Puzzle." "I don't think their first inclination is: 'OK, now we can unleash the strike on the Iranians that we have wanted to unleash.' "

Mr. Ahmadinejad has said repeatedly that Iran is not looking for war, and that he is certain the US will not attack. Despite his acrimonious face-off at Columbia University last week, and comments about gays in Iran and the Holocaust that dominated US media coverage, he stated that Iran would not threaten any nation.

But at the UN, Ahmadinejad berated "arrogant powers" that have "repeatedly accused Iran and even made military threats" on the nuclear issue. And there were other barbs: "With the grace of God, the Columbia University issue revealed their aggressive and mean-spirited image," he told Iran's state TV. "It backfired. What happened was exactly the opposite of what their shallow minds had presumed."

His performance struck a chord in Iran, where the president is under fire from rivals and even fellow conservatives for his combative style and failure to improve the economy. Ahmadinejad even said that if the US "puts aside some of its old behaviors, it can actually be a good friend for the Iranian people, for the Iranian nation."

"I was surprised by the reaction in the street, from shopkeepers, customers, taxi drivers – they were impressed" with his calm arguments and "logic," says a veteran analyst in Tehran, who asked not to be named.

The president's trip and a recent agreement reached with the UN's nuclear watchdog to resolve remaining questions, mean the "expectation in the street of a [US-Iran] military clash is lower," says the analyst. "But up there [at the highest levels], how much are they deceiving themselves?"

For it is up there – where Iran's supreme religious leader Ayatollah Sayyed Ali Khamenei makes all final decisions – that the real political battles are being fought. The powers of Ahmadinejad's rival Ali Akbar Hashemi Rafsanjani, a regime stalwart considered a "pragmatic conservative," expanded a month ago when he was elected speaker of the Assembly of Experts, a body with the power to dismiss Mr. Khamenei.

At the same time, a new commander of the IRGC was named, prompting leadership changes that this week saw the Basiji volunteer militia put under IRGC command. Maj. Gen. Mohammad Ali Jafari said the forces would "mold our structure to meet current threats."

The "main responsibility" of the IRGC, General Jafari said last week, would now be to counter "internal threats" – long the first mission of the Basiji. [Editor's note:In the original version, General Jafari's name was misspelled in this paragraph.]

"The fact that Ahmadinejad has been very successful to portray us as a threat to the world has made lots of people unhappy up there," says the Iranian analyst of elite circles. "So more and more, people are turning their backs on Ahmadinejad, and coming closer to Rafsanjani – or what Rafsanjani used to symbolize, moderation and working with outsiders."

That trend became clear during elections last December, in which Ahmadinejad's arch-conservative allies were trounced, adds the analyst: "It shows in the clerical establishment and with voters, there is a tendency away from radical, hard-line, young romantic crazy guys who want to turn the world upside down."

Ahmadinejad's US visit was billed by some as "a way of breaking down barriers between the US and Iran," says Gary Sick, an Iran expert at Columbia University who was the principal White House aide for Iran during the 1979 revolution and hostage crisis. "And if you go back and listen to all the mentions of peace and justice and harmony – all these things that we mostly ignored in his speeches – one interpretation is it was intended to create a new atmosphere."

"Did he make any inroads into American opposition to him, and/or Iranian policy? No," says Mr. Sick. At a dinner, he personally pressed Ahmadinejad about how the imprisonment of several Iranian-Americans had chilled direct person-to-person contact."I came away with a sense that this is a man who is supremely and dangerously self-confident, [who] feels he has the answers and he doesn't have to listen to expert advice."

Despite the mutual hostility, however, the US top brass, chief among them Secretary of Defense Robert Gates, and Adm. William Fallon, chief of the Central Command, have called for diplomacy.

"There are a lot of people in the Pentagon in very high positions – not to mention the CIA and State Department – that actually believe that [war] would be lunacy and a total catastrophe to American national interests," says Sick.

Still, Iran's alleged activities in Iraq have caused the White House to shift from plans for a "broad bombing attack" on nuclear and military targets in Iran to "surgical strikes" on IRGC elements deemed a source of attacks in Iraq, Mr. Hersh writes.

Bush told Amb. Ryan Crocker in Baghdad in early summer that he was thinking of such a strike, Hersh reports. He quotes a former intelligence official saying: "There is a desperate effort by [Vice President] Cheney et al to bring military action to Iran as soon as possible."

But while the Iranians appear to have been "putting their money on every number of the roulette wheel ... it is categorically different from the level of support that they provide, say, Hizbullah," Pollack says.

"No advanced antitank guided missiles. No advanced surface-to-air missiles. You don't see the kind of complete integration of Iranian personnel in Iraqi militia hierarchies the way that you did in Lebanon," he adds. "There do seem to be some limits, so I assume it is because the Iranians don't want to get into a fight with the US."