Naval Commander Mahmoud Mousavi also repeated Iran's assertion that it could control the Strait of Hormuz, the entrance to the strategic Gulf waterway that is on Iran's coast, Fars News Agency reported.
The United States, Iran's arch-foe which has a naval base in Bahrain on the Arab side of the Gulf, has not ruled out military action if diplomacy fails to end a row over Iran's nuclear plans which Washington says is to make bombs. Tehran denies this.
"We have now attained the capacity to take our defence capability to the depth of the seas, oceans and the Red Sea and face the enemy at the Bab al-Mandab strait if the enemy should have an evil intention," Mousavi said.
Bab al-Mandab is also close to the Gulf of Aden, where Somali pirates have been hijacking commercial ships. Two ships operated by Iran have been seized in that region and one is still being held.
Several foreign warships are already operating in the area against the pirates and Iran has also said it could use force against the hijackers.
"One of the world's most sensitive and strategic spots is the Strait of Hormuz. Any country which holds sovereignty and control over the Strait of Hormuz will be the field's victor as happened in the war with the Iraqi regime," Mousavi added.
Iran's 1980s war with Iraq included a period that became known as the tanker war when oil carriers and other energy installations became targets by both sides. This led to the United States stepping in to protect oil shipping.
The Iran-Iraq war ended with a cease-fire in 1988.
Iran has previously said it could close the Strait of Hormuz to shipping, through which about 40 percent of the world's globally traded oil passes. The United States has pledged to protect shipping routes.
(Reporting by Hashem Kalantari, writing by Edmund Blair; Editing by Dominic Evans)