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.

Baird weighs in

Foreign Affairs Minister John Baird invoked images of the Holocaust in defending the notion of possible Israeli military action against Iran.

Appearing on CTV's Question Period Sunday, he suggested the Jewish state has every right to feel threatened and pointed to recent comments by the Islamic republic's supreme leader, Ayatollah Ali Khamenei, who vowed to remove a "cancer" from the Middle East.

"Obviously you can understand why the Jewish people and why Israel would take him seriously," Baird said. "Hitler wrote Mein Kampf more than a decade before he became chancellor of Germany. And they take these issues pretty seriously here."

The book laid the foundation of Nazi ideology, which led to the Second World War and eventually the Holocaust.

Prime Minister Stephen Harper has described the regime in Tehran as "a grave threat to peace and security" and warned it would have no hesitation about using nuclear weapons.

"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