The display of force comes days after the U.S. and its allies warned Iran over a newly revealed nuclear facility it was secretly constructing.
Gen. Hossein Salami, head of the Revolutionary Guard Air Force, said Iran had perfected its short range missiles to make them more accurate in tactical battlefield situations and defend the country from any attacks.
"We are going to respond to any military action in a crushing manner and it doesn't make any difference which country or regime has launched the aggression," state media quoted Salami as saying. He said the missiles successfully hit their targets.
The tests came two days after the U.S. and its allies disclosed that Iran had been secretly developing a previously unknown underground uranium enrichment facility and warned the country it must open the nuclear site to international inspection or face harsher international sanctions.
The missiles tested weren't the kind that can carry a nuclear warhead. Iran is developing such ballistic missiles, but the U.S. believes that effort has been slowed.
But the timing of the missile tests has been widely interpreted as an Iranian show of force in the face of the international storm of criticism over the secret facility.
Tehran carried out the missile tests now "to show some muscle, show some strength, and say the game is not over for Iran yet," said Alex Vatanka, a senior middle east analyst at IHS Jane's. He noted that Iran will be meeting with the Western powers in Geneva next week.