NATAL, Brazil -- Military police took control Saturday of a prison in northeastern Brazil after fighting between rival gangs left 26 inmates dead in recent days, the latest in a spate of violence in the country's penitentiaries.

A week after the violence first erupted at Alcacuz prison, military police, including riot police and others, moved into the complex outside the city of Natal. As a helicopter flew overhead, an armoured vehicle also entered the complex and later construction equipment was brought in. Authorities would not say how many officers entered the complex, but an Associated Press reporter saw about 40 go in.

A few hours after the operation began, Maj. Eduardo Franco, a military police spokesman, said the complex was again under police control. The police forces now inside Alcacuz plan to separate rival prisoners, including by erecting a wall made of shipping containers.

Much of the prison appears to have been damaged in the previous week. From a vantage point outside, holes could be seen in the walls and rooftops of buildings within the complex. Debris littered the ground. Even before the recent destruction, the prison was commonly called "Swiss cheese" because it was built on sand dunes, and prisoners over the years have managed to tunnel out.

A spate of violence has seized prisons in Latin America's largest country, leaving at least 126 dead since the beginning of the year. The fighting is typically between members of rival gangs clashing over control of drug trafficking routes outside prison walls. They have been slaughtering one another inside penitentiaries in several Brazilian states.

The G1 news portal on Saturday reported another riot in a prison in Pernambuco state, also in the northeast. It quoted officials as saying one prisoner was killed and 13 injured in the violence before authorities regained control.

The series of riots and grisly killings has put a spotlight on overcrowding, underfunding and understaffing in the prison system. For instance, Alcacuz is home to more than 1,000 inmates, though it was built for 620. Images on TV and in newspapers of prisoners wielding weapons and cellphones have embarrassed President Michel Temer and put pressure on his administration to reform the system.

The violence at Alcacuz has also spilled over into Natal, where buses have been burned in recent days. The governor of Rio Grande do Norte state has said military forces are helping to patrol the city.

   ------

Associated Press writer Sarah DiLorenzo in Sao Paulo contributed to this report.