A fire broke out on Saturday in Tehran's Evin prison, where many of Iran's political and dual-national detainees are held, and witnesses reported hearing gunfire.

State news agency IRNA said eight people were injured in the unrest, which erupted after nearly a month of protests across Iran over the death in detention of Mahsa Amini, a 22-year-old Kurdish Iranian woman.

The protests have posed one of the most serious challenges to the Islamic Republic since the 1979 revolution, with demonstrations spreading across the country and some people chanting for the death of Supreme Leader Ayatollah Ali Khamenei.

An Iranian judiciary statement said a prison workshop was set on fire "after a fight among a number of prisoners convicted of financial crimes and theft". Tehran's fire department told state media the cause of the incident was under investigation.

The prison, located in the foothills at the northern edge of the Iranian capital, holds criminal convicts as well as political detainees.

"Roads leading to Evin prison have been closed to traffic. There are lots of ambulances here," said a witness contacted by Reuters. "Still, we can hear gunshots."

Another witness said families of prisoners had gathered in front of the main prison entrance. "I can see fire and smoke. Lots of special forces," the witness said.

A security official said calm had been restored at the prison, but the first witness said ambulance sirens could be heard and smoke still rose over the prison.

"People from nearby buildings are chanting 'Death to Khamenei' from their windows," the witness said.

Early on Sunday, IRNA carried a video it said showed prison areas damaged by fire. Firemen were seen dousing the debris with water, apparently to prevent the blaze from re-igniting.

The prison mostly holds detainees facing security charges, including Iranians with dual nationality. It has long been criticised by Western rights groups and was blacklisted by the U.S. government in 2018 for "serious human rights abuses".

Siamak Namazi, an Iranian American imprisoned for nearly seven years on espionage-related charges rejected by Washington as baseless, returned to Evin on Wednesday after being granted a brief furlough, his lawyer said.

Other U.S. citizens held in Evin include environmentalist Morad Tahbaz, who also has British nationality, and businessman Emad Shargi, according to human rights lawyer Saeid Dehghan.

He added that several other dual nationals are held at Evin, including French-Iranian academic Fariba Adelkhah and Iranian-Swedish Ahmadreza Djalali, a disaster medicine doctor.

Asked about the prison fire, U.S. President Joe Biden told reporters during a campaign trip to Portland, Oregon: "The Iranian government is so oppressive." He said he was surprised by "the courage of people and women taking (to) the street" in the recent protests and had enormous respect for them. "It's been really amazing," he added. "They're not a good group, in the government."

U.S. State Department Spokesman Ned Price tweeted, "we are following reports from Evin Prison with urgency. We are in contact with the Swiss as our protecting power. Iran is fully responsible for the safety of our wrongfully detained citizens, who should be released immediately."

Human Rights Watch has accused authorities at the prison of using threats of torture and of indefinite imprisonment, as well as lengthy interrogations and denial of medical care for detainees.

"No security (political) prisoner was involved in today's clash between prisoners, and basically the ward for security prisoners is separate and far from the wards for thieves and those convicted of financial crimes," an unnamed official told the Tasnim news agency.

Related Story