TUMBES, Peru (Reuters) - Thousands of Venezuelans rushed to Peru’s northern border on Friday in hopes of entering the Andean country before it imposes tough immigration requirements at midnight, as one of the hitherto most welcoming destinations for the migrants in South America closes another door to them.

Venezuela’s economic collapse under President Nicolas Maduro has unleashed the biggest migratory crisis in recent Latin American history, forcing countries like Peru - a developing nation of 32 million people - to grapple with an unprecedented surge in immigration.

Children dominated the crowds of tired migrants who arrived at the Peruvian border town of Tumbes from Ecuador on Friday, ahead of the June 15 deadline for all Venezuelan migrants to have valid visas and passports.

On Thursday alone, 5,849 Venezuelans entered Peru at Tumbes, compared to a daily average of around 1,500-2,000 in recent months, Peru’s immigration office said on Friday.

“It was awful!” said Rosmaura, a 25-year-old Venezuelan migrant who said she had traveled for a week from the eastern Venezuelan city of Maracaibo to reach Tumbes with her two children. She declined to give her second name.

Rosmaura was afraid that after June 15 Peru would not let her 5-year-old daughter in because she lacks a passport, which she said costs $200-$500 to acquire in Venezuela - an impossible fee for most people in a country where the monthly minimum wage equates to just $6.

She said she hopes to make it to Chile.

Slideshow ( 17 images )

“Most of my family is there,” she said.

Four million Venezuelans - more than a tenth of the population - have fled the economic and humanitarian crisis in their homeland, the United Nations said last week.

Peru is home to some 800,000, the government says - the second-largest Venezuelan migrant population outside Colombia, which houses more than 1.2 million.

Just two years ago, Peru had introduced new migratory laws to accommodate Venezuelan migrants. It doled out hundreds of thousands of special residency cards so they could work legally, go to school and access public health care.

But the tide has since turned, amid growing fears fanned by media reports and politicians that Venezuelan migrants are driving down wages and fuelling crime.

Peru cut short its special residency program and started deporting Venezuelans with criminal records. The government has said it would require migrants to secure a visa from its consulates in Venezuela before going to the border - a policy similar to one implemented by neighboring Chile.

As migrants took buses, hitchhiked and trekked their way to Peru’s border on Thursday, President Martin Vizcarra defended his new immigration stance from an event in the northern city of Piura.

“Our country has opened its arms to more than 800,000 Venezuelans. I think it’s completely logical and justified to ask them to bring visas to ensure better control of who enters,” Vizcarra told journalists.