TEHRAN - Iranians waved “Death to America” banners and took selfies with a ballistic missile Thursday as they marked 37 years since the Islamic revolution, weeks after Iran finalised a nuclear deal with world powers.

In the capital, hundreds of thousands converged on the historic Azadi (Freedom) Square, where President Hassan Rouhani made a speech addressing Iran’s political camps. “True (conservatives), true reformists and true moderates are all revolutionary,” he said in remarks broadcast live on state television.

“In our time, ‘revolutionary’ means being in favour of participation, tolerance, and resistance, and having goods capable of competition in world markets.”

The anniversary of Iran’s 1979 revolution comes two weeks ahead of crucial parliamentary elections.

“Our vote will be a vote for hope, rationality, law and the protection of the rights of the Iranian nation,” he said. “It is a ‘No’ to those who do not respect the law and seek confrontation.”

Many demonstrators on Thursday carried the traditional placards reading “Death to America” and “Death to Israel” while others carried the Iranian flag.

Organisers read a statement to the crowd, saying that the US remained “the number one enemy of Iran”.

Iran holds an annual revolution celebration, but Thursday’s was the first since a landmark deal with world powers - including the United States - was finalised, paving the way for punishing economic sanctions on Tehran to be lifted.

The deal has seen a host of foreign investors declare interest in Iran, an unblocking of frozen Iranian assets held abroad and a warming of ties between the Islamic republic and the West.

Young people at a rally on Thursday reconstructed a scene from mid-January that saw US Navy sailors detained by Iranian Revolutionary Guards.

State television has repeatedly broadcast pictures of the 10 captive sailors with their hands on their heads. On Wednesday night, a brief video also showed one soldier in tears.

Touted domestically as proof of Iran’s ability to defend its borders, the sailors were released within 24 hours, just days before the nuclear deal was finalised on January 16.

Revolutionary Guards were present on Thursday, displaying a long-range Imad ballistic missile in central Tehran. Many people were taking selfies with the missile, the ISNA news agency reported.

Last October, Iran “successfully” tested the new weapon, which Tehran says has a range of 1700 kilometres (1050 miles).

An Iran-made military drone was also on display, according to an AFP photographer, and local media published images of General Qassem Suleimani, chief of the Guards’ Quds special forces, marching in the rally.

Louis Farakkhan, leader of the American group Nation of Islam, was also set to make a speech as honorary guest after Rouhani.

Iran’s Supreme Leader Ayatollah Ali Khamenei and other leaders had called in recent days for mass participation in anniversary rallies.