A wave of migrants from Venezuela has arrived in neighboring countries over the past several months.

Their presence has strained social services and sparked resentment among local populations.

That sentiment has at times spilled over into violence, and a recent incident in Brazil prompted the government to deploy more troops for security.

The number of Venezuelans fleeing to neighboring countries has swelled over the past year, and in recent days Brazil has sent in more military personnel to deal with violent backlash to that influx.

Early on Saturday in Pacaraima, a municipality in the Brazilian state of Roraima on the border with Venezuela, encampments set up by Venezuelans were attacked by Brazilians angry about a local restaurant owner who had been beaten and robbed, allegedly by Venezuelans.

Groups of men carrying sticks and stones reportedly set fire to dwellings and other items belonging to Venezuelans. The attackers also left tires to block the only road between the two countries, according to the state government.

The Roraima state security secretary told Reuters that Brazilian soldiers stationed in Pacaraima asked Venezuelan immigrants to return home for their own safety. Videos showed Brazilians shouting "Out, out, out!" at Venezuelans returning to Venezuela.

One Venezuelan family there during the attacks said Brazilian security forces were present but did not intervene. Venezuelans migrants also said clothes, personal documents, and food they bought to send home was destroyed. About 1,100 Venezuelans are believed to have been living on the street in Pacariama.

The attacks reportedly caused more than 1,200 Venezuelans in Brazil to flee back to their country, a Brazilian official said, adding that the flow of Venezuelans into Brazil, roughly 500 a day on average, was "much lower than the previous days."

"I do not know what to do. I do not want to go back to Venezuela," one Venezuelan woman, whose shack was burned down in the attack, told Brazilian news site Globo. A Venezuelan man in Brazil with family members told Globo, "I would rather die of hunger in Venezuela with my family than be killed here."

A Brazilian military officer helps a Venezuelan man across the border after he showed an airline ticket for Foz do Iguacu, at the Pacaraima border control in Roraima state, Brazil August 19, 2018. REUTERS/Nacho Doce

Across the border in Venezuela, migrants returning from Brazil reportedly attacked a group of 30 Brazilians there shopping, who had to be taken to a shelter.

On Sunday, Brazilian President Michel Temer and the public-security ministry both said 120 troops and health specialists would join teams at the border on Monday. Other reports indicated 60 members of elite, military-style National Force would join personnel already operating in Roraima.

Thousands of Venezuelans have fled to Brazil because it is one of the few countries that doesn't require them to show a passport for entry.

Roraima, on the border with Venezuela, has been a focal point for Venezuelan migration. The state has tried to close the border and limit services for arrivals, though the federal government and courts have blocked those efforts.

Indigenous Warao people from the Orinoco Delta in eastern Venezuela at a shelter in Pacaraima, Roraima state, Brazil, November 15, 2017. REUTERS/Nacho Doce

In the wake of the weekend's violence, Roraima state Gov. Suely Campos asked the government to temporarily close the border and send more security to address an increase in crime she attributed to migrants. The state government again requested the border be closed on Monday, though that request was unlikely to be granted.

"The closure of the border is unthinkable because it is illegal," Sergio Etchegoyen, Brazil’s minister of institutional security, said Monday, adding that soldiers were patroling the border. "There's tension, but there's no conflict," he said.

The Venezuelan government on Saturday called on the Brazilian government to provide "guarantees to Venezuelan nationals and take measures to safeguard and secure their families and belongings."

Brazil's response to the influx of Venezuelan migrants has been led entirely by the military, Geoff Ramsey, the associate for Venezuela at the Washington Office on Latin America, said in a May interview. Security forces have also been deployed by Colombia to deal with an influx of migrants there.

While the Brazilian military has extensive logistical capabilities, soldiers are not well prepared for humanitarian tasks, which has been evident on the ground there, Ramsey said.

Violence against Venezuelans in Brazil has already taken place, including attacks on homes where they're staying and, allegedly, lynchings of Venezuelans suspected of committing crimes.