On foot, by bus, on the backs of juddering trucks, like tens of thousands of others they slogged for days along the Pan-American Highway through Colombia and Ecuador.
Grubby and sleepless, their goal was to reach Peru, a sanctuary of sorts for a desperate Venezuelan family.
Exhausted and swept by the endless wash of traffic noise on the highway's shoulder, the Mendoza Landinez family had the additional pressure of a deadline: to enter Peru before new rules required them to produce a passport.
It pushed Joel Mendoza, his companion Edicth Landinez and her two children Nacari and Sebastian, into a desperate race against the clock. Also in tow are Edicth's niece Eliana with her baby, Tiago.
Thursday August 23
In Pasto, southern Colombia, near the Ecuadoran border, they hitch a ride on a truck. On board are 11 Venezuelans, including seven on the open flatbed behind, three of them children.
The cold is numbing.
Huddled against the wind, Joel throws an arm around Edicth. They left Guanare in western Venezuela together on August 15. A tough decision but their combined wages as a truck driver and domestic worker could buy "nothing" - just a kilo of soap.
Crossing mountainous Colombia, already home to more than a million Venezuelan migrants, they found cold but some comfort from strangers who gave them food.
"Leaving one's country takes its toll," said Joel, 51.
"Abandoning what took so much effort is hard," says Edicth. At 34, her tired eyes and weathered skin make her look older. They have only the clothes they are wearing, with some blankets in a suitcase.
The trucker who drove them for over 40 hours from the Venezuelan border buys them breakfast. And a Venezuelan woman, who made the same trip herself in July and works in a restaurant, offers them lunch.
The day began at 6:00 a.m. Eight hours later, they board another truck, which leaves them a few kilometers outside Ipiales, near the Ecuadoran border. They have crossed Colombia.
Nervous, they hike for 90 minutes to the border. Edicth is the only one of them to have a passport, which Ecuador now requires instead of ID cards in a bid to control a seemingly endless wave of migrants.
Other Venezuelans coming in the opposite direction tell them they should turn around.
"I have faith that they will let us in," insists Edicth. Joel nervously pulls on a cigarette. The sun goes down. The temperature drops.
Sixteen year old Nacari and Sebastian, 6, rest on their bags. They make no complaint. Eliana 19, cradles 5-month-old Tiago. Fraught, she barely utters a word.
At 6:40 p.m. rumors are circulating that Ecuador is letting migrants cross without passports and will also lay on a bus to take them to Peru.
Joel can scarcely believe it. "God be praised!" he says. The family prays together, hug each other. Edicth beams a wide smile.
It will not last.
Friday August 24. Separation
Relieved, the family rests in Ecuadoran Red Cross tents set up on the streets at Tulcan, where hundreds of Venezuelan migrants have congregated.
Shortly after midnight, they are awake and on the move again, but already there has been a delay of four hours. The cold is brutal. More delays follow as Edicth is forced to return to the Colombian side to have a document stamped for Sebastian.
She hurries. Those who travel with children are a priority to get on the buses to Huaquillas, on Ecuador's border with Peru.
One problem resolved, they are confronted by another: Eliana and her baby are stopped, her ID card so damaged that border police suspect tampering.
"I'm not going without her," said Edicth. Joel replies: "I have to go. If I don't get across today I'm not getting in to Peru." They get good news. Ecuador will give a temporary ID to Edicth's niece and her baby.
At 2:10 a.m. they begin to board the bus. The journey to Huaquillas takes between 16 and 18 hours. They should arrive just before the midnight Friday deadline. Eliana decides to head for Quito with two other traveling companions. She's crying. Her baby has a bad case of nappy rash. She doesn't have any nappies left to change him. Edicth tries to comfort her. "All this journey for that," she weeps over the separation, her voice broken. They embrace and part ways. At 2:47 a.m. the rest of the family climbs aboard.
The mother can't get to sleep, thinking of Eliana "alone with her baby" in the Quito-bound bus. She borrows a phone to call her sister.
On the bus, the other Venezuelans sing and joke. The family try to catch up on lost sleep. But the delays have taken their toll. They won't make the border on time.
Saturday August 25. Hope
At 3:35 a.m. they arrive at Huaquillas bus terminal. Peru's passport requirement has been in force for four hours already, the border is effectively closed to them.
"We would have all crossed alright if we hadn't had so many delays," lamented Edicth. She is worried for her niece, who has meanwhile arrived in Quito.
Her sister Evelyn, 38, has been in Lima for the past three months, looking after Leonardo, her nephew and Edicth's 17-year-old son. In the beginning, her son had a job on a construction site. But now he is in hospital with depression. His aunt has been looking after him but, as a result, lost her job in a restaurant.
"I understand how bad he feels," says Edicth. She breaks off to mount a bus to Tumbes, on the Peruvian border. Their hope now is to claim refugee status.
"To put up with hunger, begging for money, lacking everything, it's the first time that's ever happened me," says Nacari.
The family haven't been able to wash for three days.
In Tumbes, they wait in line at the border post for their case to be examined. They are hoping for a temporary residence permit.
"We set out from Venezuela as backpackers. Getting this far, we are already winners."
Story by Rodrigo Almonaacid/Agence France Presse; Photos by Luis Rabayo