LIMA (Reuters) - Brazil said it was sending armed forces to keep order near the Venezuelan border area, while Peru declared a health emergency, as a regional crisis sparked by thousands of Venezuelans fleeing economic collapse escalated on Tuesday.

FILE PHOTO: Army soldiers patrol on a street next to people from Venezuela after checking their passports or identity cards at the Pacaraima border control, Roraima state, Brazil August 19, 2018. REUTERS/Nacho Doce

In Brazil, where residents rioted and attacked Venezuelan immigrants in a border town earlier this month, President Michel Temer signed a decree to deploy the armed forces to the border state of Roraima. He said the move was aimed at keeping order and ensuring the safety of immigrants.

Peru, meanwhile, declared a 60-day health emergency in two provinces on its northern border, citing “imminent danger” to health and sanitation. The decree, published in the government’s official gazette, did not give more details on the risks, but health authorities have previously expressed concerns about the spread of diseases such as measles and malaria from migrants.

The exodus of Venezuelans to other South American countries is building toward a “crisis moment” comparable to events involving refugees in the Mediterranean, the United Nations said this week.

Temer blamed the socialist Venezuelan government of President Nicolas Maduro for the migration crisis.

“The problem of Venezuela is no longer one of internal politics. It is a threat to the harmony of the whole continent,” Temer said in a televised address.

Top immigration officials from Peru, Colombia and Brazil met in Colombian capital Bogota for a summit to discuss how to cope with the influx.

There are close to 1 million Venezuelans now living in Colombia and more than 400,000 in Peru, the countries said in a joint statement after the meeting on Tuesday. Just 178,000 of those in Peru have legal permission to stay or are being processed.

In an attempt to track arrivals and distribute aid, Colombia and Peru said they would share information about migrants in a database.

Maduro has warned migrants they face difficult conditions abroad and invited them to return home. On Tuesday, Venezuela said it had repatriated 89 citizens who had migrated to Peru but sought to return after suffering “cruel treatment.”

“They listened to the siren call from abroad ... and all they found in Lima was racism, disdain, and persecution,” Maduro told a news conference.

He said Venezuelans should stop leaving the country to clean toilets and return to the “country of opportunity.”

Oscar Perez, an activist who works with Venezuelan migrants in Peru, said the repatriation was a publicity stunt by the Venezuelan government.

An official at Peru’s Foreign Ministry declined to comment on the repatriation, saying the country was focused on regional solutions to address the situation.

This month, Peru and Ecuador began requiring passports instead of national ID cards from Venezuelan migrants. Peru has also tightened deadlines for Venezuelans to sign up for a temporary residency card that lets them work in the country legally.

On Saturday, the first day Peru imposed its passport rule, the number of Venezuelan migrants entering the country fell by more than half to 1,630, according to Peru’s immigration agency. But hundreds more without passports entered the country by seeking asylum.

Foreign ministers from Ecuador and Colombia, and possibly Peru and Brazil, will meet to discuss Venezuelan migration in Ecuador next week, said Christian Kruger, the head of Colombia’s migration agency.