SAO PAULO: At least 25 inmates died Sunday in clashes between two rival factions in a prison in far northern Brazil, local media reported citing police.

Seven of the dead were beheaded and six burned to death in fighting at a prison in Boa Vista, the capital of Roraima state, the news site G1 reported, citing local police.

The bloodshed began when inmates of one wing of the Agricola de Monte Cristo prison broke into another wing.

Inmates were armed with knives and wooden clubs, an inmate's wife who was in the prison when the riot broke out told G1.

Roraima state Secretary of Justice Uziel Castro said that the fight erupted during visiting hours, and some 100 relatives of inmates were briefly held hostage.

The rioters demanded that a judge come to hear their demands.

Instead Special Operations Police stormed the prison, released the hostages and regained control of the site by sundown.

"All the hostages were released," Castro said, adding that most of them were women.

The prison, some 3,400 kilometers northwest of Rio de Janeiro, is in a state that borders Venezuela.

Police and state officials did not immediately respond to phone calls from AFP.