Ecuador has launched a crackdown on Venezuelan migrants after a pregnant Ecuadorian woman was killed on Saturday evening.

The police and Ecuador’s president, Lenín Moreno, have said that that Diana Carolina Ramírez’s killer was her boyfriend, a Venezuelan immigrant. His name was given as Yordy Rafael LG, who was said to be in custody.

Ramírez was 22 and four months pregnant when she was stabbed to death after being held hostage for an hour and led through the streets of Ibarra, a northern city.

Video of the killing was captured by witnesses and circulated on social media, triggering national outrage. It led Moreno to tighten immigration controls for Venezuelans and dispatch special forces to the streets.

“I have ordered the immediate setting up of units to control Venezuelan immigrants’ legal status in the streets, in the workplace, and at the border,” Moreno tweeted on Sunday afternoon. “We have opened our doors, but we will not sacrifice the security of anyone.”

Ecuador, along with other South American countries, has received hundreds of thousands of Venezuelans fleeing an economic crisis back home, where hyperinflation is rampant and food and medicine shortages are widespread.

According to UNHCR, the United Nations’ refugee agency, 3 million Venezuelans have now fled while Ecuadorian authorities say that 1.3 million Venezuelans entered the country last year, with most continuing south to Peru.

Moreno also announced that the government might create a special permit for Venezuelans to enter the country, though he offered no details. Last year his administration said it was implementing regulations that would require Venezuelans to show passports on entering the country, though it was blocked in the courts.

In the aftermath of the murder, spates of attacks against Venezuelan people broke out, particularly in Ibarra. Videos circulating on social media show mobs of Ecuadorians harassing Venezuelans, breaking into their homes and burning their possessions. Videos from airports and bus terminals, where Venezuelans often congregate, show similar harassment.

Venezuela’s government, which has long been at diplomatic loggerheads with Ecuador and denies any crisis at home, denounced the attacks and accused Ecuador’s government of stoking xenophobia, which has been sporadically rearing its head since the start of the Venezuelan exodus three years ago.

“President Moreno and his government have incited a fascist persecution against Venezuelans in Ecuador,” Venezuela’s foreign minister Jorge Arreaza tweeted on Sunday night. “We hold [Ecuador’s government] responsible for the security of our compatriots.”

Ecuador’s interior minister, María Paula Romo, said police could have done more to prevent the stabbing, and said she had fired Ibarra’s police chief.

“There are rules to follow but the police have the obligation to act and especially when it concerns protecting a life. The femicide was committed whilst the police were there and they should have acted,” Romo said in a press conference.

Human rights groups were also quick to denounce Moreno’s decision to send state forces into the streets. “This declaration, and the brigades it proposes, only increases xenophobia,” José Miguel Vivanco, Americas director at Human Rights Watch tweeted. “The government cannot propagate collective hysteria.”