text: Image copyright AFP Image caption The rioters are negotiating with officials to end the protest 
   
   Police in Brazil say rioters in a jail in the southern city of Cascavel have killed four fellow inmates and injured several others. 
   
   Two of the victims were decapitated while two more died after they were pushed off the roof of the building. 
   
   The authorities restarted negotiations with the rioters on Monday morning in the hope of ending the stand-off. 
   
   At least 700 prisoners are reported to be involved in the uprising, which began on Sunday morning. 
   
   The prisoners are said to be unhappy about how the prison is run, as well as about food and hygiene there. 
   
   Local media showed prisoners beating men held with ropes around their necks on the roof of one of the buildings. 
   
   'Psychological torture' 
   
   The trouble broke out when warders delivering coffee to inmates were reportedly overpowered. 
   
   As many as 1,000 prisoners then took over parts of the jail, ransacking and setting fire to much of it. 
   
   The BBC's Wyre Davies in Rio de Janeiro says that rival prison gangs are most likely taking advantage of the riot to settle scores. 
   
   The leaders of the rebellion are holding at least two prison guards hostage. It is not clear whether the hostages have been harmed. 
   
   Guards have not yet been able to retrieve the bodies of the four people killed in the unrest. 
   
   "They are using the severed head of one of the prisoners to inflict psychological torture on one of the hostages," said Jairo Ferreira, lawyer for the prison agents' union. 
   
   "There are scenes of terror inside the jail now," he told local newspaper Gazeta do Povo. 
   
   Negotiations restarted first thing on Monday to put an end to the uprising, which has led to the destruction of most of the penitentiary, according to O Globo newspaper. 
   
   The Security Secretary of Parana State, Maria Tereza Uille Gomes, has travelled to Cascavel to take over the negotiations. 
   
   Brazil has the world's fourth largest prison population, with half a million inmates in facilities meant to hold 300,000. 
   
   Our correspondent says that, across the country, many poorly resourced jails are in effect run by powerful crime gangs. 
   
   Earlier this year the UN High Commissioner for Human Rights, Navi Pillay, called for an investigation into the high number of violent deaths in Brazil's prisons after previous riots at a jail in the north of the country left dozens of people dead. ||||| Brazilian authorities reached a deal with rioting prisoners Monday who killed four fellow inmates, beheading two of them, and held two guards hostage. 
   
   Elson Faxina, a spokesman for the Parana state attorney's office, said an agreement was signed to end the uprising at the Cascavel city correctional facility and that prisoners were currently being transferred to another jail. 
   
   "After that, the two guards who were held hostage will be freed," Faxina said, adding that police still had to enter the jail to assess the damage and determine if there are more victims. 
   
   Some 800 inmates -- or 80 percent of those being held at the facility -- took part in the revolt, he said. 
   
   The riot erupted Sunday as breakfast was being served, with inmates overpowering guards. 
   
   Two prisoners were beheaded in the first surge of violence, and two others were thrown off the top of the cellblocks. 
   
   View gallery Screen grab taken from CGN shows inmates holding a hostage at a prison in the southern city of Casca … 
   
   The guards were taken hostage in the melee. 
   
   An official with the guards' union said only 10 wardens were on duty at the time. 
   
   Prison authorities said the inmates were demanding improved facilities, better quality food and more flexible visiting hours. 
   
   But the inmate-on-inmate violence also suggested that rivalries between competing prison gangs played a role in the uprising. 
   
   "The fact that prisoners took hostages would reinforce that view," Faxina said earlier. 
   
   View gallery Screengrab from CGN shows inmates taking hostages at a prison in the southern city of Cascavel, Para … 
   
   Television images had shown some of the rioting inmates -- dressed in orange jumpsuits with their faces obscured -- on the roof of the facility during the mutiny. 
   
   Police have yet to identify the four inmates who were killed and retrieve the remains of the two who were beheaded, according to authorities. 
   
   - Prison overcrowding - 
   
   The state correctional center, which houses 1,140 inmates, has a capacity for 1,181, according to official data. 
   
   Anthony Johnson, president of the prison guard union in Parana state, said the true capacity of the facility was just 900. 
   
   "So there's overcrowding," he said. "For us, the situation is tense now but we hope it is resolved. A jail of this kind needs investment." 
   
   According to the union of prison workers, a major lack of investment plagues the system, and the facility was threatened by a scarcity of operational and technical professionals as well as proper maintenance. 
   
   "Many times the workers have to invest their money to buy the necessary items to do their jobs," the union said in a statement. 
   
   "Without investment, we are always exposed to this. The prisoners claim that food is bad, that there are no lawyers to process things, minimal hygiene products don't exist, there are few correctional officers. All the factors together are a tragedy waiting to happen." 
   
   Brazil holds 548,000 inmates in its prisons, but needs 207,000 more spaces to avoid overcrowding, according to the NGO Conectas Human Rights.
target: – Two prisoners were beheaded and at least another one died after being thrown off the roof in a riot that erupted yesterday in a prison in southern Brazil, authorities say. Inmates of the penitentiary in the city of Cascavel took at least two agents and several other inmates hostage in the uprising, said military police Capt. Ricardo Pinto, who added that negotiations for better conditions in the prison were still under way last night. The BBC and AFP say the riot was still ongoing this morning, and that a fourth prisoner had been killed after also being pushed from the roof. The revolt began before sunrise yesterday when a prison guard was captured during breakfast. Prisoners set some objects on fire and were using metal poles to cause damage to the 928-bed prison that housed more than 1,000 inmates. Dozens of the prisoners climbed onto the building's rooftop, with their faces covered with white fabric. Local media images showed at least 30 rebellious inmates shouting while they beat men held with ropes around their necks, or whose hands were tied behind them. The rioting inmates waved banners emblazoned with the initials PCC for a criminal prison gang formed in the 1990s. Jairo Ferreira, a lawyer for the prison guards' union, said the prisoners rioted to demand better food and medical care.