BRASILIA (Reuters) - Police restored order in a northern state of Brazil on Monday after three nights of violence unleashed by a criminal gang that set off bombs, torched dozens of buses and fired shots at government buildings, authorities said.

The wave of violence in Rio Grande do Norte, around 1,553 miles (2,500 kms) north of Rio de Janeiro, was triggered by a plan to move some of the gang's leaders serving time in the state's main penitentiary to other jails, and in response to the blocking of their cellphone communications, officials said.

Brazil's President Michel Temer, seeking to quell the violence just days before the Olympic Games open in Rio, authorized the dispatch of 1,000 soldiers and 200 marines to the state on Sunday. No Olympic events are taking place in Rio Grande do Norte.

"We are winning this war," the state's security chief, Army General Ronaldo Lundgren, told Reuters by telephone. "The number of incidents is dropping," he said of the violence in the capital Natal and about 20 other towns across the state.

His office said 65 people suspected of committing acts of violence and vandalism had been arrested since Friday.

Among them was an alleged founder of the gang, Joao Maria dos Santos, 32, aka John the Magician, who used a false pass in December to escape from the penitentiary where he was serving a 20-year sentence for organized crime, drug trafficking and illegal weapons possession.

Dos Santos was arrested on Sunday with 302,000 reais ($92,600) in cash, 20 kilos of crack cocaine, two handguns, jewelry, watches and 68 cellphones, a police statement said.

It said 26 buses had been destroyed by fire, four buildings had been shot at and four bombs exploded across the state. No injuries were reported.

Some schools were closed after a school bus was set on fire.

(Reporting by Anthony Boadle; Editing by Andrew Hay)