Thousands of Venezuelans have rushed to cross into Peru in a bid to beat the introduction of tougher migration laws. From midnight local time (05:00 GMT) on Saturday, Venezuelans will need to have a valid passport and visa to enter Peru.
The new requirements prompted a dash to the border from those fleeing Venezuela's years-long economic crisis. Some four million people have fled Venezuela since 2015, according to the United Nations.
The country's imploding economy has resulted in high unemployment and shortages of food and medicine, and hundreds of thousands of people are said to be in need of humanitarian aid.
Prior to Saturday's deadline, Venezuelan citizens wanting to enter Peru only require a national ID card.
Nearly 6,000 Venezuelans entered through the border town of Tumbes on Thursday, officials said, which is almost three times the daily average.
Peru's President Martin Vizcarra defended the tougher migration restrictions on Thursday.
Our country has opened its arms to more than 800,000 Venezuelans, he told reporters at an event in the northern city of Piura. I think it's completely logical and justified to ask them to bring visas to ensure better control of who enters.
Latin American countries host the vast majority of Venezuelan migrants and refugees. Colombia has the most at 1.3 million, followed by Peru with 768,000, according to UN figures.
Under the government of Nicolás Maduro, the economy has collapsed and shortages of food and medicines have become widespread. In parts of the oil-rich country, fuel has become scarce and drivers queue for days at petrol stations. There are also frequent blackouts.
The government says the shortages are caused by US sanctions. The opposition argues that they are the result of mismanagement and corruption by consecutive socialist governments.
The crisis deepened in January after Juan Guaidó, the head of the National Assembly, declared himself interim president, arguing that Mr Maduro's re-election last year had been illegitimate.
He has since been recognised by more than 50 countries, including the US and most of Latin America. But Mr Maduro retains the loyalty of most of the military and important allies such as China and Russia.