BEIRUT (Reuters) - Iran marked the anniversary of its 1980 invasion by Iraq by showing off its latest ships and missiles and telling the United States not to meddle in the Gulf.

At a parade in Tehran on Wednesday, shown on state TV, the military displayed long-range missiles, tanks, and the Russian-supplied S-300 surface-to-air missile defense system.

At the port of Bandar Abbas on the Gulf, the navy showed off 500 vessels, as well as submarines and helicopters, at a time of high tension with the United States in the strategic waterway.

U.S. officials say there have been more than 30 close encounters between U.S. and Iranian vessels in the Gulf so far this year, over twice as many as in the same period of 2015.

On Sept. 4, a U.S. Navy coastal patrol ship changed course after an Iranian Revolutionary Guard fast-attack craft came within 100 yards (90 meters) of it in the central Gulf, at least the fourth such incident in less than a month, U.S. Defense Department officials said.

“We tell the Americans that it’s better that the capital and wealth of the American people should not be wasted on their inappropriate and detrimental presence in the Persian Gulf,” said Major General Mohammad Ali Jafari, commander of the Islamic Revolutionary Guard Corps.

The Tasnim news site quoted him as saying: “If they want to extend their reach and engage in adventurism they should go to the Bay of Pigs” - a reference to the location of a botched U.S. attempt to overthrow Cuban leader Fidel Castro in 1961.

In Tehran, the Chief of Staff of the Iranian Armed Forces, Major General Mohammad Hossein Baqeri, declared that Iran wanted peace.

“BROTHERS IN FAITH”

But he said Iran’s lessons in the 1980-88 war against Iraq now served as a guide for “our brothers in faith” in Syria, Palestine, Lebanon, Iraq, Afghanistan, Yemen and Bahrain, countries where Iran has political, religious or military allies.

Among the weapons displayed was the new long-range “Zolfaqar” ballistic missile, named after a legendary sword said to have given by the Prophet Mohammad to Imam Ali. It has “a cluster warhead capable of hitting targets spread over the ground”, according to Tasnim.

A banner on the side of a truck carrying the new missile bore a threat to Iran’s arch-foe Israel: “If the leaders of the Zionist regime make a mistake then the Islamic Republic will turn Tel Aviv and Haifa to dust.”

The Russian-supplied missile defense system on show in Tehran was deployed last month around Iran’s underground uranium enrichment facility at Fordow.

Enrichment at the site, around 100 km (60 miles) south of Tehran, has stopped since the implementation in January of Iran’s agreement with world powers to curb its nuclear program in exchange for an easing of sanctions.

Also on display was the Qadr H missile, which has a range of 2,000 km, according to state TV. Iran’s ballistic missile program has been criticized by the West, and the U.S. Treasury imposed sanctions on two Iranian companies in March because of their alleged ties to it.