Iran has test-fired what it called a new version of the Shahab-3 missile, which puts it within range of its main regional enemy Israel, state media say.
The missile, said to have a range of 2,000 km (1,240 miles), was one of nine launched from a remote desert site.
Iran has tested the Shahab-3 before, but the latest test comes amid rising tensions with the US and Israel over Iran's nuclear programme.
Worries about the stand-off have been one factor pushing up world oil prices.
"We are ready to defend the integrity of the Iranian nation," said the commander of Iran's Revolutionary Guards' air force, Brigadier General Hoseyn Salami.
Our missiles are ready for shooting at any place and any time, quickly and with accuracy
Brig Gen Hoseyn Salami
Commander, Iranian Revolutionary Guards Air Force
Two other types of missile with shorter ranges were also fired as part of the Great Prophet III war games being staged by the Guards.
"Our missiles are ready for shooting at any place and any time, quickly and with accuracy," Gen Salami added. "The enemy must not repeat its mistakes. The enemy targets are under surveillance."
The BBC's Jon Leyne in Tehran says this is a clear warning from Iran.
It is a response to a recent military exercise by Israel, which was seen as a rehearsal for an attack on Iran's nuclear facilities, he says.
Earlier, an adviser to Iran's Supreme Leader said it would respond to any military attack by hitting the Israeli city of Tel Aviv.
Other commanders have threatened to close the Strait of Hormuz, through which a large part of the world's oil flows, and to target the US and its allies around the world if Iran comes under attack.
The missile test came shortly after the US Treasury announced new financial sanctions on Iranian officials it suspected of involvement in the country's nuclear programme.
Among those targeted were a senior scientist at the defence ministry, Mohsen Fakhrizadeh-Mahabadi, and three companies believed to be related to the arms industry.
Western powers suspect Tehran of seeking to produce nuclear weapons. Tehran says its nuclear programme is peaceful.
The US also signed on Tuesday an agreement with the Czech Republic to build a radar station near Prague as part of a defence shield to shoot down incoming missiles from what Washington calls "rogue states" such as Iran.
The move drew immediate criticism from Russia, which warned that it would proceed with its own military deployments.