"Today, with the grace of God, we have gone through the arduous passes and we are ready for anything in this path," state-run television quoted Ahmadinejad as saying Thursday.
The comments were an apparent reaction to the U.S. decision to deploy a second aircraft carrier, the USS Stennis, to the Gulf. U.S. Defense Secretary Robert Gates said the increased U.S. presence was to impress on Iran that the four-year war in Iraq has not made America vulnerable.
Administration officials have said diplomacy was the focus of their policy on Iran but have never ruled out attacks on Iran.
Ahmadinejad denounced critics of his nuclear diplomacy at home, saying their calls for compromise echo "the words of the enemy" and will not affect his government's handling of the nuclear dossier with the West.
Conservatives and reformists alike have in recent weeks openly challenged Ahmadinejad's hard-line nuclear diplomacy tactics, with many saying his fiery anti-Western remarks are doing more harm than good.
Reformists have called for a return to suspension of nuclear activities to avoid further punishment at the U.N. Security Council.
"Unfortunately, some inside the country try to fabricate news and portray a bad image of the great achievement of the Iranian nation," Ahmadinejad said in reference to Iran's uranium enrichment program.
They "prescribe compromise, repeat the words of the enemy. Of course, this will have no effect," he added, speaking during a visit to the offices of the state-run newspaper Iran on Thursday, according to the television.
The U.S. and its allies accuse Iran of secretly trying to develop nuclear weapons, an allegation Tehran denies.
Iran has rejected as "invalid" and "illegal" a U.N. Security Council resolution that imposed sanctions on Iran last month for refusing to halt uranium enrichment. Enrichment is a key nuclear process that can produce either fuel for a reactor or the material needed for a warhead.
Ahmadinejad said Iran will not be deterred by threats and sanctions.
"Their aim is to frighten Iran and weaken the resistance of the Iranian nation, but they will not succeed," he was quoted as saying.
Meanwhile, in Paris on Thursday, the head of the U.N. nuclear watchdog agency, Mohamed ElBaradei, said he was concerned that U.N. sanctions on Iran could escalate the standoff with Western powers over its nuclear program.
ElBaradei called for a resumption of negotiations with Tehran and said he would support any efforts to "engage Iran," including the possibility of a French negotiator.
"My worry right now is that each side is sticking to its guns," said ElBaradei, head of the International Atomic Energy Agency. "We need someone to reach out."