Joda - Some walked, others were luckier and hitched a ride, but all ended up in the open at a Sudanese border checkpoint, waiting to cross and leave South Sudan's war behind.
Hundreds of crying children and exhausted adults have converged on the border post at Joda, where Sudan's White Nile state meets the South's Upper Nile, which saw heavy fighting this week.
They are among an estimated 10 000 who have fled north to Sudan in an exodus that the UN refugee agency (UNHCR) says has seen almost 80 000 people seek refuge abroad from deadly fighting between government and rebel forces in South Sudan over the past month.
"I fled from my home before sunset, and spent the night in a forest," a South Sudanese woman told AFP.
Like others in Joda, the woman, who asked not to be named said she had come from Malakal, the Upper Nile state capital, about 300km southwest of the border.
"There was heavy fighting in Malakal," said the woman, aged 25.
On Monday, rebels staged an assault to seize back the city, where tank battles were reported in the streets. Both the government and the rebels have claimed to control Malakal, one of just three major cities in the south.
The woman said she caught a ride with a truck and reached Joda on Wednesday.
Others have been waiting at the border gate for longer, after arriving with not much more than some spare clothes carried in bags or wrapped in blankets.
Some pushed wheelbarrows loaded with mats and other belongings.
"We have been waiting here four days," said Samuel John, also a former Malakal resident.
He said they have neither received any aid nor been allowed to cross into Sudan.
"We are still at the border gate because the Sudanese authorities asked us for our identity documents. But we don't have any because we are fleeing the war," John said.
What the refugees want, he added, is transport "to anywhere in Sudan".
Sudanese officials told AFP that an aid convoy was expected to arrive in the Joda area on Friday, and officials were on their way to start registration of the refugees.
President Omar al-Bashir said in early January that the frontier would be opened and South Sudanese were free to enter under an agreement governing the unrestricted flow of people between the two states.
But Sudan's relief needs were already strained by pre-existing conflicts in Darfur, South Kordofan and Blue Nile state, even without an influx of refugees from the south.
UNHCR described as "nomads" the thousands who have fled north from South Sudan's violence, primarily to Sudan's Kordofan region, but says it has not had access to check numbers.
The official SUNA news agency said Thursday that up to 3 000 southern refugees have reached White Nile and Kordofan.
"We came because we heard that President Bashir ordered authorities to open the border for us," but the gate remains shut, said another escapee from Malakal, David Jiha.
Still, they are more fortunate than some.
At least 200 South Sudanese drowned in a ferry accident on the White Nile while fleeing Malakal's violence, an army spokesperson said on Tuesday.
The same day, the United Nations said one person was killed and dozens were wounded by gunfire which fell on its Malakal compound where 20 000 people had sought safety.
"We ask the UN and international agencies to help these women and children," Jiha said at the border post in a flat landscape dotted with low trees.
Some of the displaced southerners have attached blankets to the branches, forming rough shelters where they hide from the burning sun.