An attack on Iran would be catastrophic and encourage it to develop a nuclear bomb, Mohamed ElBaradei, director general of the International Atomic Energy Agency, said on Thursday.
"It would be absolutely counterproductive, and it would be catastrophic," ElBaradei said at a discussion on nuclear proliferation at the World Economic Forum.
The Bush administration in recent weeks has toughened its stance against Iran, which the West has accused of seeking to secretly build an atomic bomb, raising fears among political and business leaders that the United States plans an attack.
President George W Bush has moved an additional aircraft carrier into the Gulf and told Iran that he would not allow it to provide weapons and support to insurgents in Iraq.
Israel has refused to rule out pre-emptive military action against Iran on the lines of its 1981 air strike against an atomic reactor in Iraq, although many analysts believe Iran's nuclear facilities are too much for Israel to destroy alone.
The United Nations imposed sanctions in December to prevent Iran using its nuclear energy program for military weapons, and Iran this week banned 38 IAEA nuclear inspectors.
ElBaradei, head of the UN's nuclear watchdog, has been engaged in meetings here at the gathering of world political and business leaders.
He said diplomacy is the only way forward, and talk of military action can only backfire.
"This strengthens the hands of those in Iran who say 'let's develop a bomb to protect ourselves," he said.
The Bush administration has said it wants a diplomatic solution and that it is not preparing to attack either Iran or Syria.
Pakistan's Prime Minister Shaukat Aziz also warned against an attack, while Iran's former president Mohammad Khatami urged calm to reduce tensions over Iran's nuclear program.
"If there is military action, it will have catastrophic results, not only in the region, but the whole world," Aziz said.
"I hope they would be good enough in managing the situation. We deeply need patience and understanding and not to get too emotional," Khatami said.
ElBaradei said force should not be ruled out, but past experience has shown that it should not be used with haste, citing Iraq where no evidence of nuclear weapons was found after the US-led invasion. "I am convinced that the only way forward in Iran is engagement," ElBaradei said.
"We have to invest in peace," he said, adding that if the international community failed to do that "the consequence will be 10 times worse."
"I hope we will stop speaking about a military option and focus on finding a solution," ElBaradei said.
Iran says it needs nuclear power to generate electricity but the West fears it is secretly seeking an atom bomb.
In December, the United Nations imposed sanctions on Iran's trade in sensitive nuclear materials and technology to try and stop enrichment work that could produce bomb material.