Two prisoners in a Lebanese prison have been killed after security forces stormed the jail complex to stamp out a riot. Another six or more inmates were wounded in the melee.

A security official told reporters that one of the prisoners died when a stun gun detonated in his hands, while the other was a casualty of a heart attack during the police raid.

The riot started over the weekend when inmates, enraged by overcrowded conditions, broke windows and burned mattresses at Roumieh prison, east of Beirut, and the largest correctional facility in Lebanon.

On Tuesday, inmates took three security guards as hostage in one building, while setting a fire in another building.

During the siege, about 70 relatives of the incarcerated protested outside the prison on Tuesday and Wednesday, setting tires on fire to prevent traffic on the road leading to the jail. They also threw rocks at riot police who tried to enter the complex.

After the raid, the three guards were freed and police are now in control of the prison.

According to Al Jazeera, Roumieh was designed to hold 1,500 inmates, but it currently has 3,700 (only 721 of whom have even been tried and convicted of crimes).

They are demanding an end to the overcrowding and a general pardon, a security source told Al Jazeera.

There are people who have been detained for months - and up to two years - without trials.

Ziad Baroud, Lebanon caretaker interior minister, said he ordered the establishment of a police office on Roumieh’s ground to address prisoners’ complaints.

I am very supportive of their demands, Baroud said on Tuesday. We are working to deal with the matter without having one drop of blood spilled.

The country’s caretaker Prime Minister Saad Hariri reportedly discussed the prison situation in Roumieh with cabinet ministers and judicial officials and decided to improve living and security conditions in the prison.