The United States and Iran appear on a collision course in the Middle East, firing off mixed messages that are raising world tension and roiling oil markets amid fears that an eventual confrontation may be military.

Both insist war is not imminent, but their sharp words and provocative actions are stoking uncertainty as Washington and Tehran joust for strategic supremacy in the oil-rich region where American might — along with that of its top ally in the area, Israel — has long been dominant.

Concern spiked on Wednesday when Iran test-fired nine long- and medium-range missiles during war games in the Strait of Hormuz, aiming to show it can retaliate against any U.S. or Israeli attack. The display followed a joint military exercise by Israel and Greece last month in the Mediterranean that many saw as a warning to Iran.

• Click here to view photos.

VIDEO: Missile Test | Obama Calls Iran 'Great Threat'

The Iranian missile tests drew a quick response from Washington, which said the launches were further reason not to trust a country that it already accuses of fomenting instability in Iraq, supporting Israel's foes and attempting to build nuclear weapons. The testing sent oil prices higher before they calmed down later in the day.

This despite the fact that leaders on both sides — President George W. Bush and Iranian President Mahmoud Ahmadinejad — had just this week tried to tamp down speculation that the use of force is inevitable.

As he nears the end of his presidency, Bush says repeatedly that diplomacy is his preferred option to deal with any threat posed by Iran's nuclear program, although he has just as often refused to take the military option off the table. Ahmadinejad, who has often spoken of wiping Israel off the map, this week dismissed talk of war as a "funny joke."

"I assure you that there won't be any war in the future," Ahmadinejad said Tuesday during a visit to Malaysia.

Shortly after Wednesday's missile tests, the White House didn't fling out any dire new warnings to Iran but settled for saying the testing was "completely inconsistent with Iran's obligations to the world" and served to further isolate the country.

Defense Secretary Robert Gates and Secretary of State Condoleezza Rice stood clear of discussing possible military responses, arguing that the tests instead were proof that a proposed missile shield for Europe, a system that has drawn vehement opposition from Russia, is vital to defending U.S. interests and allies.

At a Pentagon news conference, Gates allowed that there had been a "lot of signaling going on" in the escalation of rhetoric between Iran, Israel and the U.S., but he added he does not think confrontation is closer.

So why does speculation about conflict continue to grow?

A main reason may be that neither side appears able to judge the other's true intent.

U.S. officials say they can't discern Iran's motivations, citing the closed nature of the regime and ostensible differences between the country's hardline Islamic religious leaders, its Revolutionary Guards and moderates. Some Iranian leaders may want peace, but not others, they say.

While Ahmadinejad tones down his rhetoric, others in Tehran have stepped up warnings of retaliation if the Americans — or Israelis — launch military action against Iran's nuclear sites. They threaten to hit Israel and U.S. regional bases with missiles and stop oil traffic through the vital Gulf region.

Wednesday's launches "demonstrate our resolve and might against enemies who in recent weeks have threatened Iran with harsh language," said Gen. Hossein Salami, the Revolutionary Guard's air force commander, according to state media. "Our hands are always on the trigger and our missiles are ready for launch," he was quoted as saying.

At the same time, the Iranian leadership may face a similar quandary in judging U.S. intentions. While Bush, Gates and Rice are stressing diplomacy, other, more hawkish, elements of the administration, notably Vice President Dick Cheney, are using more bellicose language similar to that of Israeli officials who have been more outspoken about the possible use of force.

And, with Bush's second term waning, Iran's calculations are also likely to be guided by what it thinks the policies of the next U.S. president will be.

The Republican and Democratic candidates, John McCain and Barack Obama, both agree Iran is a threat. But they differ on how to deal with it.

Obama said the tests underscored the need for direct diplomacy with Tehran, while McCain's response mirrored that of the Bush administration and focused on tougher sanctions against Iran.

Some analysts believe Bush will act militarily against Iran before he leaves office in six months and that if he doesn't, McCain will, if he is elected.

John Pike, the director of GlobalSecurity.org, a defense, security and space intelligence consultancy, is one.

"Bombing is either going to be the last thing Mr. Bush does or the first thing Mr. McCain does," he said.