The demonstrators, waving the Iranian flag and holding signs with anti-US slogans, streamed into the iconic Enqelab (Revolution) Square where they chanted slogans in support of the Islamic Establishment and expressed outrage at anarchist measures meant to inflict damage on public property during the riots.
The square filled up quickly on with young and old, including clerics carrying portraits of Iran's Leader Ayatollah Seyyed Ali Khamenei.
National TV carried live footage of the rally which it referred to as the "Rise of the people of Tehran against riots. It showed people chanting "Death to America,” and "Death to Israel”.
An SMS message was texted to citizens on Sunday evening, asking them to attend the rally.
The message called on "Tehran's wise and revolutionary people" to take part and condemn "American-Israeli riots".
Addressing the crowd, Major General Hossein Salami, the chief commander of Iran's Islamic Revolution Guards Corps (IRGC), warned the United States, Britain, Israel and Saudi Arabia not to push Iran into devastating retaliation over their support for rioters.
"You have received a strong slap in the face," Salami warned them.
"We have shown restraint...We have shown patience toward the hostile moves of America, the Zionist regime (Israel) and Saudi Arabia against Iran...But we will destroy them if they cross our red lines,” Salami told the huge crowd that covered the square and spilled into side streets.
Chants of "Death to the USA" and "Death to Israel" rang out as some in the crowd set fire to American flags.
Salami said the rise in gasoline prices was a "mere pretext” for an attack on the nation.
"We will not leave any move unanswered.”
"Whoever wants to attack our properties, our lives and dignity will be severely punished in such a way that everyone would learn a lesson,” the commander warned.
He said if Iran decides to respond, "The enemy will not have security anywhere,” adding that "our patience has a limit.”
"This war is over," Salami said.
"You have defeated the power of the arrogance," he said, referring to America.
"The enemy has collapsed and today it is disappointed because of the glory of your presence. The coup de grace has been delivered."
Long-fraught links between Tehran and Washington plunged to a new low in May last year when the US unilaterally withdrew from an international accord that gave Iran relief from sanctions in return for curbs on its nuclear program.
In a surprise announcement on November 15, Iran raised the price of gasoline by up to 200 percent, triggering nationwide protests.
President Hassan Rouhani said the proceeds would allow his administration to provide welfare payments to the needy.
Officials say the demonstrations turned violent because of the intervention of "thugs" backed by royalists and Iran's arch-enemies – the United States, Israel and Saudi Arabia.
During the violence, dozens of banks, gas and police stations were torched across Iran.
Officials have confirmed five people were killed.
The US has sided with Iran’s rioters, while France and Germany have expressed concern over reports of deaths during the protests.
Authorities said late last week that disturbances had ceased. They say 180 ringleaders were arrested.
Rear-Admiral Ali Fadavi, the deputy commander in chief of the IRGC, warned Sunday that Iran would severely punish "mercenaries" arrested over the violence.
Last Friday, Judiciary Spokesman Gholam-Hossein Esmaili said, among those elements, there were some tied to the anti-Iran and US-backed terrorist Mujahedin-e Khalq Organization (MKO), royalists as well as separatists, who were nabbed in the country’s border provinces, and members of organized groups trained towards staging acts of sabotage.
According to the spokesperson, the arrestees included those serving foreign interests, organized elements, and hooligans with multiple criminal records, who had amassed firearms, knives and incendiary materials to foment unrest.
AP, AFP, Reuters and Press TV contributed to this story