Two prison guards held as hostages in an ongoing prison rebellion in Brazil have been freed during negotiations between authorities and inmates, according to officials.

The Parana state justice secretariat said a group of more than 30 prisoners was leading the rebellion at the Guarapuava prison, where 10 guards were still held hostage. 

An unknown number of other inmates were also involved, according to the state justice secretariat.

It said talks with the prisoners continued on Tuesday, and that their demands included better food, treatment and the transfer of some inmates out of the prison.

"One guard was released because he suffered burns and was in immediate need of medical attention. The other guard was released in exchange for food being brought to the prison," Al Jazeera’s Gabriel Elizondo reported from Sao Paulo.

"The negotiations are extremely complicated and delicate as state special forces police on the scene risk the situation turning more violent if they go in with force," our correspondent said.

"It's no secret Brazil has some of the worst prisons, with massive overcrowding and often a lack of enough guards to control the number of inmates. So the prisons are very vulnerable to prisoners overtaking control," he added.

The riot began on Monday when prisoners overpowered guards while on work duty. Television images showed hooded inmates atop a prison roof armed with knives and clubs and beating some of the captive guards. At least six people were injured after falling off the roof. It was not clear if they had fallen off or were pushed.

Rising trend

Prison riots are becoming increasingly common in Brazil and the one in Guarapuava was the 21st in Parana state alone this year.

"Increasingly inmates view rioting and hostage taking as a way to pressure authorities for more humane incarceration conditions," Elizondo said.

A rebellion in the Cascavel prison in August lasted 45 hours and left five people dead, resulting in 800 inmates being transferred to other prisons.

Horrific conditions and inter-gang violence are seen in many facilities, some of which are essentially run by drug gang leaders who continue to run their criminal enterprises on the outside despite being locked up.

Our correspondent said inmates involved in the Guarapuava rebellion were believed by the police to belong to a group called the "First Command of the Capital," or the PCC.

The criminal organisation, born out of the prisons in Sao Paulo in the last 20 years, is widely considered to be one of the most powerful criminal organisations not only in Brazil, but in all of South America, with a presence in almost all 27 Brazilian states and increasingly in other countries in the region.

The gang, a multi-million-dollar organisation, focuses on drug trafficking, extortion and money laundering, and commands unparalleled power within the prison system in Brazil - and also outside.

Source: Al Jazeera and agencies