Hundreds of prisoners have escaped from four semi-open prisons in São Paulo state in the south-east of Brazil after Easter prison holidays were cancelled and restrictions on visitors tightened because of coronavirus.

Videos showed dozens of prisoners fleeing down a street near one coastal prison and flooding across a soccer pitch on a beach.

There were riots and escapes from semi-open prisons in Tremembé, Porto Feliz and a wing of a prison in Mirandópolis in São Paulo state. In one video hordes of prisoners could be seen running away in Mongaguá on the São Paulo coast – where 400 reportedly fled – while a man shouts: “Come back Monday, OK?” Other videos showed dozens on a beach. The G1 news site reported that 40 had been recaptured.

The São Paulo state penitentiary department said it had postponed the Easter prison break – one of five annual breaks for prisoners in semi-open regimeswho work in the day – because of coronavirus. “The measure was necessary because the benefit would include more than 34,000 convicts of the semi-open regime who, returning to prison, would have high potential to install and propagate coronavirus,” said a statement, adding that semi-open prisons did not have armed guards.

Police and prison officer riot teams recovered control over the four prisons and recaptured 174 prisoners, it later said. The human rights news site Ponte estimated as many as 1,500 had escaped.

“These prisoners were unhappy about the decision that suspended the Easter leave,” said Lincoln Gakiya, a prosecutor in São Paulo state and specialist in drug gangs. “The prisoners were told and in some units, rebelled.”

The rebellions echoed the situation in Italy’s crowded prisons, where 10 have died in riots following restrictions on visits from family members.

Other security specialists said anger over the treatment of leaders of Brazil’s biggest drug gang, the São Paulo-based First Capital Command (PCC), was also a factor. Some prisoners have complained over the treatment of PCC leaders, refusing to go to hearings in what is called a “white strike”, said Renato Lima, director-president of the Brazilian Public Security Forum. Others were angry over restrictions on visitors showing signs of colds or suspected of carrying coronavirus.

Eight guards were taken hostage in Mongaguá, said Lima, and there would have been many more if the state did not have a centrally controlled locking system.

Gruesomely violent prison riots and breakouts are common in Brazil’s overcrowded prisons, many of which are controlled by drug gangs like the PCC and its rivals – 57 people were killed last year in just one rebellion in Altamira in the Amazon.

But coronavirus posed a new threat, Lima said. In 2017 a third of Brazil’s prisoners, 234,000 people, did not have a health station in their prisons and nearly 9,000 prisoners were over 60. “It’s a timebomb,” Lima said.