TEHRAN — The head of Iran's nuclear program said on Monday that Tehran was now operating double the amount of advanced centrifuges than was previously known in violation of its atomic deal with world powers.

The announcement came as Iranians marked the 40th anniversary of the 1979 U.S. Embassy takeover and start of the 444-day hostage crisis.

The decision to operate 60 IR-6 advanced centrifuges means that the country can produce enriched uranium 10 times as fast as the first-generation IR-1s allowed under the accord.

The nuclear deal limited Iran to using only 5,060 first-generation IR-1 centrifuges to enrich uranium by rapidly spinning uranium hexafluoride gas. Salehi also said Tehran was working on a prototype centrifuge that's 50 times faster than those allowed under the deal.

By starting up these advanced centrifuges, Iran further cuts into the one-year time limit that experts estimate Tehran would need to have enough material to build a nuclear weapon, if it chose to pursue one.

Demonstrators perched atop of the U.S. Embassy wall burn an American flag on Nov. 4, 1979. Bettmann Archive / Getty file

Meanwhile on Monday, demonstrators gathered in front of the former U.S. Embassy in downtown Tehran as state television aired footage from other cities across the country.

"Thanks to God, today the revolution's seedlings have evolved into a fruitful and huge tree that its shadow has covered the entire" Middle East, said Gen. Abdolrahim Mousavi, the commander of the Iranian army.

However, this year's commemoration of the embassy seizure comes as Iran's regional allies in Iraq and Lebanon face widespread protests. The Iranian Consulate in Karbala, Iraq, a holy city for Shiites, saw a mob attack it overnight. Three protesters were killed during the attack and 19 were wounded, along with seven policemen, Iraqi officials said.

Associated Press video showed a fire burned the consulate's gate as demonstrators threw gasoline bombs and climbed its walls, some waving an Iraqi flag. Iranian media only reported a "protest outside" of the diplomatic post, adding that things had returned to normal.

President Donald Trump retweeted posts by Saudi-linked media showing the chaos outside the consulate. The violence comes after the hard-line Keyhan newspaper in Iran reiterated a call for demonstrators to seize U.S. and Saudi diplomatic posts in Iraq in response to the unrest.

Demonstrators at other rallies on Monday cried: "Death to America!" and "Death to Israel!" Lawmakers in parliament echoed those cries after approving the outline of a bill that would include anti-American teachings in school textbooks. Others at protests burned U.S. flag replicas and waved signs mocking Trump and America.

A billboard at Tehran's Vali-e-Asr Square, used by hard-liners to highlight their political views, showed people waving flags from around the world and cheering as an American flag burned. A caption on it read: "We are the superpower."

Typically, members of Iran's regular armed forces don't speak at the embassy on the anniversary, rather civilians and those in its paramilitary Revolutionary Guard hold speeches. Mousavi's appearance likely represented an effort by Iran's theocratic government to show a united front against the pressure it faces from the U.S. under Trump.

What exactly led to the 1979 takeover of the embassy was obscure at the time to Americans who for months could only watch in horror as TV newscasts showed Iranian protests at the embassy. Popular anger against the U.S. was rooted in the 1953 CIA-engineered coup that toppled Iran's elected prime minister and cemented the power of Shah Mohammad Reza Pahlavi.

The shah, dying from cancer, fled Iran in January 1979, paving the way for the country's Islamic Revolution. But for months, Iran faced widespread unrest, ranging from separatist attacks, worker revolts and internal power struggles. Police reported for work but not for duty, allowing chaos to unfold, including for Marxist students to briefly seize the U.S. Embassy.

In this power vacuum, then-President Jimmy Carter allowed the shah to seek medical treatment in New York. That lit the fuse for the Nov. 4, 1979, takeover by Islamist students, who initially planned a sit-in at the embassy.

But the situation quickly spun out of their control.

Ebrahim Asgharzadeh, left, a representative of the Iranian students who stormed the U.S. Embassy, holds up a photo of one of the blindfolded hostages during a news conference in Tehran on Nov. 5, 1979. Posters of Ayatollah Ruhollah Khomeini adorn the wall. AP file

Ayatollah Ruhollah Khomeini, the long-exiled Shiite cleric whose return to Iran sparked the Islamic Revolution, gave his support to the takeover. He would use that popular angle to expand the Islamists' power.

Some hostages would be released as the crisis unfolded, while several others who escaped the embassy and found safety with Canada's ambassador, left Iran via a CIA-planned escape — dramatic moments that were recounted in the 2012 film "Argo."

Another 52 American hostages would be held for 444 days until the inauguration of President Ronald Reagan, when they were freed.