The comments by Gen. Amir Ali Hajizadeh, who heads the Guard's aerospace division, came amid tension over Iran's nuclear program and Israel's suggestion that it might unilaterally strike Iranian nuclear facilities to scuttle what the United States and its allies believe are efforts to build a bomb. Tehran says its nuclear program is for peaceful purposes.
Hajizadeh said no Israeli attack can happen without the support of its most important ally, the United States, making all U.S. military bases a legitimate target.
"For this reason, we will enter a confrontation with both parties and will definitely be at war with American bases should a war break out," Hajizadeh said in remarks that were posted on the website of Iran's state Al-Alam TV. U.S. facilities in Bahrain, Qatar and Afghanistan would be targeted, he said.
"There will be no neutral country in the region," Hajizadeh said. "To us, these bases are equal to U.S. soil."
The U.S. Fifth fleet is based in Bahrain and the U.S. has a heavy military presence in Afghanistan.
Despite Israeli hints of a military strike, Iran's military commanders believe Israel is unlikely to take unilateral action against Iran. The Guard's top commander, Gen. Mohammad Ali Jafari, said last week that Iran believes the United States won't attack Iran because its military bases in the Middle East are within the range of Iran's missiles.
Iran has also warned that oil shipments through the strategic Strait of Hormuz will be in jeopardy if a war breaks out between Iran and the United States. Iranian officials had previously threatened to close the waterway, the route for a fifth of the world's oil, if there is war.
Israel believes that any attack on Iran would likely unleash retaliation in the form of Iranian missiles as well as rocket attacks by Iranian proxies Hezbollah and Hamas on its northern and southern borders.
Prime Minister Benjamin Netanyahu of Israel says international diplomatic efforts and economic sanctions against Iran have failed to deter its nuclear ambitions, and he has urged U.S. President Barack Obama to declare "red lines" that would trigger an American attack on Iran's nuclear facilities, coupling his appeals with veiled threats of an Israeli attack.
Obama has rejected these calls, saying diplomacy and U.S.-led sanctions must be given more time and that Iran will never be allowed to obtain nuclear weapons. American officials have pressed Israel not to attack Iran unilaterally, a move that could set off regional mayhem just ahead of the November election.