Dozens of riot police stood guard at Peru’s northern border on Saturday, hours after new entry measures requiring Venezuelan migrants to hold a passport and humanitarian visa took effect.

More than 9,000 Venezuelans entered the country with just their national ID cards on Friday, the highest number ever recorded by Peruvian immigration authorities.

Peru’s Foreign Minister Nestor Popolizio told the radio station RPP on Saturday that the mandatory humanitarian visa for migrants was a “beneficial” measure that would help Venezuelans obtain permission to work legally for 183 days.

He said that some exceptions would still be allowed for “minors who only have birth certificates and are in transit to Peru to meet up with their parents, adults in transit to meet their families, adults in extremely vulnerable positions and the elderly.”

Hundreds of thousands seek refugee status

He also acknowledged that securing a passport in Venezuela is difficult, but said that “the majority” already enter with such a document.

According to Peruvian authorities, more than 820,000 Venezuelans have settled in Peru since 2016 of which 270,000 have sought refugee status.

Peruvian President Martin Vizcarra has said the new entry requirements will make immigration “safer and more orderly” and that the large influx of Venezuelan immigrants was making it harder for Peruvians to find jobs.

But human rights groups in the country have criticized the move, describing it as an attempt to lessen the numbers of needy people who are entering.

Stephania Robles and her five-year-old son were two of the last migrants to come into the Andean country with just their IDs on Saturday.

“[I came] to look for a better life. My husband is in Peru in the city of Trujillo. My sisters are in Lima,” the 30-year-old said.