Updated

The United Nation's human rights agency called Wednesday for an "immediate, impartial and effective investigation" into the violence that has swept through a penitentiary in northeastern Brazil where at least 60 inmates were killed in 2013 in clashes between rival gangs.

Violence from the prisons has spilled onto the streets of Sao Luis, the capital of Maranhao state where the prison is located. Police say imprisoned gang leaders angered by authorities attempted crackdowns inside the prison ordered their members to spark terror by setting buses ablaze and shooting up the outside of police stations.

A 6-year-old girl died this week after being severely burned during one bus attack. Gas stations in the city largely complied with a police request to halt the sale of fuel to anyone wanting to fill-up a gas canister, hoping to squeeze off gangs' ability to buy flammable liquids used to torch buses.

The U.N. Office of the High Commissioner for Human Rights said in a statement that it was concerned with the "dire state of prisons in Brazil" and asked authorities to move immediately to restore order at the Pedrinhas penitentiary in Maranhao state.

The violence in the penitentiary was highlighted Tuesday when a gruesome video purporting to show the decapitated bodies of three inmates was posted on the website of the Folha de S.Paulo newspaper. It said inmates recorded the images on Dec. 17.

"The grisly crimes caught on camera are part of a broader problem of uncontrolled violence in Maranhao's prisons," Maria Laura Canineu, Brazil director of the non-governmental organization Human Rights Watch said in a statement. "The state urgently needs to investigate these crimes, restore order in the prisons, and ensure the inmates' safety."

Judge Douglas Martins recently issued a report saying that state authorities have been unable to control the situation at Pedrinhas that stem from its overcrowded conditions, gang fights and the orders given by gang leaders to rape women who are visiting husbands, sons and brothers.

Pedrinhas was built to hold 1,770 inmates but has a current prison population of nearly 2,200.

The Maranhao state government said in a statement that Martins' findings were based on "untruths aimed at worsening the situation inside the state's prison system."

Requests for further comment from the offices of Gov. Roseana Sarney, the daughter of Brazil's former president and current Sen. Jose Sarney, were not returned. The Sarney family has held sway over politics in Maranhao state for decades.

The rights group Amnesty International also expressed concern Wednesday with the "increasing violence and lack of concrete solutions" in the Maranhao state prison system.

About 500,000 inmates are locked up in Brazil's more than 1,200 prisons, and prison breaks and uprising are common.

Justice Minister Jose Eduardo Cardozo has said that Brazil had "a medieval prison system that violates human rights."

Similar prison conditions exist elsewhere around Latin America.