"Iran will not repeat its warning ... the enemy's carrier has been moved to the Sea of Oman because of our drill. I recommend and emphasize to the American carrier not to return to the Persian Gulf," army chief Salehi said.
"I advise, recommend and warn them over the return of this carrier to the Persian Gulf because we are not in the habit of warning more than once."
Lieutenant Rebecca Rebarich, spokeswoman for the U.S. 5th Fleet based in Bahrain, said she was not immediately able to respond.
Tehran's threat comes at a time when sanctions are having an unprecedented impact on its economy, and the country faces political uncertainty with an election in March, its first since a 2009 vote that triggered countrywide demonstrations.
The West has imposed the increasingly tight sanctions over Iran's nuclear program, which Tehran says is strictly peaceful but Western countries believe aims to build an atomic bomb.
After years of sanctions that had little impact, the latest measures are the first that could have a serious effect on Iran's oil trade, 60 percent of its economy.
Even Iran's top trading partner China - which has refused to back new global sanctions against Iran - is demanding discounts to buy Iranian oil as Tehran's options narrow. Beijing has cut its imports of Iranian crude by more than half for January and, paying premiums for crude from Russia and Vietnam to replace it.
Iran has responded to the tighter measures with increasingly belligerent rhetoric.
It spooked oil markets briefly when it announced last month it could prevent shipping through the Straight of Hormuz - a narrow shipping lane through which flows 40 percent of the world's oil trade - if sanctions hurt its own oil business.
It then held 10 days of naval exercises in the Gulf, test firing long range missiles that could hit Israel or U.S. bases in the Middle East. But Tuesday's apparent threat to take action against the U.S. military for sailing in international waters takes the aggressive rhetoric to a new level.
The new U.S. sanctions law, if implemented fully, would make it impossible for many refineries to pay Iran for crude. It imposes measures gradually and allows Obama to offer temporary waivers to prevent an oil price shock.
The European Union is expected to consider new measures by the end of this month, possibly including a blockade. EU members such as such as crisis-hit Greece are still buyers of Iranian oil, which trades at a discount.
French Foreign Minister Alain Juppe said Paris wants new measures taken by January 30, when EU foreign ministers meet.
"France ... wants sanctions toughened and the president (Nicolas Sarkozy) has made two concrete proposals on that front - the first being the freezing of Iranian central bank assets, a tough measure, and the second an embargo on Iranian oil exports," Juppe told i>tele, a French TV channel.
Michael Mann, spokesman for EU foreign policy chief Catherine Ashton, said member states would discuss the issue this week in the hope of reaching an agreement on new steps before the January 30 meeting.
"The ball is still in the Iranians' court," he said.
Although China, India and other countries are unlikely to sign up to any oil embargo, they will be able to insist on deeper discounts, potentially reducing the income Tehran receives from oil.
Beijing has been driving a hard bargain. China, which bought 11 percent of its oil from Iran during the first 11 months of last year, has cut its January purchase by about 285,000 barrels per day, more than half of the close to 550,000 bpd that it bought through a 2011 contract.