RIO DE JANEIRO, Brazil (AP) _ A clash between rival gangs during a prison rebellion in midwestern Brazil left at least six inmates dead on Wednesday, police and prison officials said.

The uprising at the Santo Antonio Leverger Public Prison near Cuiaba, 980 miles northwest of Rio de Janeiro, began after inmates took two guards hostage and began burning mattresses to protest overcrowding, said Antonio Carlos Garcia, a police officer from Mato Grosso state.

The prison held 188 inmates, although it was built to hold just 80.

During the rebellion, rival gangs battled with improvised spears known as chucos. Garcia said at least six inmates were killed, and local media reported that nine prisoners had died.

Garcia said the rebellion was under control but that the number of dead could reach 10.

Rebellions are common in Brazilian prisons, where conditions are poor and overcrowding is chronic.