Iran has vowed to retaliate against any country whose territory is used by "enemies" of the Islamic state to launch a military strike against its soil.

The threat of a possible counter-attack, reported Sunday by the semi-official Fars news agency, comes amid increased tension in the Middle East and fears the impasse between Western nations, Israel and Iran over Tehran's nuclear enrichment program could lead to war.

Hossein Salami, deputy head of the Iran's elite Revolutionary Guard, spoke to the agency Saturday during military ground exercises.

"Any spot used by the enemy for hostile operations against Iran, will be subjected to retaliatory aggression by our armed forces," he was quoted as saying.

Salami's remarks came as U.S. President Barack Obama reiterated in a televised interview that the U.S. was working closely with Israel to figure out how best to ensure Iran is not in the stages of building nuclear-weapons capability.

Obama hopes for diplomatic solution

"I don't think that Israel has made a decision on what they need to do," Obama said, adding that the U.S. has not yet ruled out any options — including military intervention — in with Iran. He stressed that the U.S. wished for a diplomatic resolution soon.

Tehran has stepped up its defensive posturing as international pressure mounts over allegations that it is seeking to develop nuclear weapons, a charge it denies.

On Friday, Iran's supreme leader said any military strikes over the country's nuclear program would damage U.S. interests in the Middle East "10 times over."

In a nationally broadcast speech, Ayatollah Ali Khamenei also pledged to aid any nation or group that challenges Israel, which has publicly backed the efforts by the U.S. and European Union for tougher sanctions that target Iran's crucial oil exports.

Late last month, both the European Union and Iran raised the stakes in the conflict, with the EU banning the purchase of Iranian oil and Iran threatening to retaliate by closing the Strait of Hormuz, through which a fifth of the world's crude is transported.

On Jan. 22, American aircraft carrier USS Abraham Lincoln entered the Gulf to conduct scheduled maritime security operations.

Late last month, the British Ministry of Defence said British and French warships joined the U.S. carrier group transiting through the Strait of Hormuz "to underline the unwavering international commitment to maintaining rights of passage under international law."

With files from The Associated Press