Four prisoners have died and 61 have been injured following a major fire at Iran’s notorious Evin prison, according to an Iranian state news agency.

Sources inside the prison – which is known for housing political prisoners – have told BBC Persian the number of casualties is higher.

Videos shared online showed flames and smoke at the site in Tehran, and gunshots and explosions could be heard.

The fire followed weeks of anti-government protests across Iran.

Hundreds of those taking part in protests have been sent to Evin prison. It is not known whether the situation at the jail is linked to the demonstrations.

The protests 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.

State media has suggested the events in Evin prison are not linked to the ongoing protests, quoting an official who blamed “criminal elements” for the fire.

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.

Meanwhile, Iran’s Mizan News has said the injured developed breathing difficulties during a fire at the prison’s sewing workshop. Four of the injured are in critical condition, it reported.

Some journalists on social media accused the authorities of “setting the prison ablaze intentionally” as a high profile political prisoner was sent home before it broke out.

Mehdi Hashemi Rafsanjani – son of Iran’s late former president Akbar Hashemi Rafsanjani – was given “early temporary release”, according to his brother.

Dramatic footage of the fire and smoke was first posted on social media on Saturday evening.

In several videos people could be heard outside the prison chanting “death to the dictator” – one of the main slogans of the anti-government protest movement.

Gunshots and explosions were audible in other videos – prompting rights groups to raise grave fears for the fate of the inmates.

The Fars news agency – which is linked to Iran’s Revolutionary Guards – initially said the explosions were due to mines going off after a prison break.

“Some prisoners who attempted to escape amid the fire, ended up in a minefield in the northern side of the prison,” it reported.

Later however, the agency said this was not the case, quoting a source saying no prisoner had stepped on a mine.

One video posted online appeared to show objects fired into the prison from outside its perimeter, followed by the sound of an explosion.

Families and lawyers of prisoners had not been allowed near the jail last night, and roads were blocked, the family of a political prisoner told BBC Persian. [BBC News]