A major fire broke out on Saturday at Iran’s notorious Evin prison, known for housing political prisoners, journalists and foreign nationals.
Videos shared online showed flames and smoke at the site in Tehran, and gunshots and explosions could be heard.
An official quoted by state media said the situation was under control, but video footage appeared to show the fire continuing after this.
Iran has been gripped for weeks by anti-government protests.
They first erupted last month after the death of 22-year-old Kurdish Iranian Mahsa Amini in police custody. Officials said she died of a heart attack, but her family disputed this, saying she was beaten by morality police.
BBC Persian’s Rana Rahimpour said it is not yet known whether the situation at the prison is linked to the recent demonstrations.
But this could easily be the case, Rana said, as hundreds of the protesters have been sent to Evin.
State media has suggested the two are not linked, quoting an official who blamed “criminal elements” for the fire. Eight people were injured, state-controlled outlet IRNA said.
Speaking from inside the prison, Tehran’s governor told state TV that there was a riot in a wing of the prison housing petty criminals, and the situation was now completely calm.
Images shared by IRNA reportedly showed the damage inside the prison after the fire.
Dramatic footage of the fire and smoke was first posted on social media on Saturday evening.
Gunshots and explosions were audible in several videos, and in others people could be heard outside the prison chanting “death to the dictator” – one of the main slogans of the anti-government protest movement.
One video appeared to show objects fired into the prison from outside its perimeter, followed by the sound of an explosion, according to BBC Persian.
Large crowds gathered outside the prison, traffic came to a standstill and riot police were seen entering the facility.
Even after Iranian media claimed that calm had been restored, the situation at the prison was still confused, said BBC Persian’s Kasra Naji. Videos continued to appear on social media showing the fire still burning and the sound of gunshots.
Other pictures showed inmates on the roof of a section of the prison where political prisoners and many of the protestors who have been arrested in the past four weeks are kept, Kasra said.
The families of some prisoners told the BBC that they were unable to contact their relatives on the phone, which they would normally be able to do, and that internet connection around the prison appeared to have been cut off.
British-Iranian dual nationals Nazanin Zaghari-Ratcliffe and Anoosheh Ashoori were both held at Evin prison for several years on spying charges, which they denied, before their release earlier this year.
The prison has long been criticised by Western rights groups. 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.
A group of hackers calling themselves Edalat-e Ali (Ali’s Justice) posted videos in August last year of leaked surveillance footage from Evin prison showing guards beating or mistreating inmates.
Some foreign governments whose citizens are being held in the prison have expressed concern.
A spokesperson for the US state department said it was following events with “urgency”, while the UK Government’s security minister called it a “very worrying development”.
Since the death of Ms Amini five weeks ago, a wave of protests has swept across Iran in the boldest challenge to the Islamic Republic since its establishment in 1979.
Many of those who have died have been teenagers.__BBC.com