The United States has denied being behind moves by the government in Djibouti to expel illegal migrants.
Any transport that is available is overcrowded
In July, an estimated 100,000 foreigners in the country, some 15% of the population, were told they must leave.
Last Sunday, the expulsion deadline was extended until 15 September.
More than 50,000 have already left, but thousands more have congregated in camps and found themselves stranded on borders waiting for transport, with trains and buses overcrowded.
Many others are afraid to return home, mentioning continuing conflict in Somalia and fears of repression and persecution in Eritrea and Ethiopia.
Warnings by Washington of possible attacks on Western interests in the country are thought to have led the government to clamp down on the foreigners.
The headquarters of the US-led war against terror in the Horn of Africa moved to Djibouti in May with 1,500 United States soldiers stationed there. The country also hosts 2,700 French military personnel, as well as 800 German and 50 Spanish troops.
In a statement, the US embassy in Djibouti said it had "played no role in the formation of the Djiboutian government's current policy".
It added that it was concerned about accusations that migrants had been mistreated during operations to expel them.
The Djibouti authorities have also publicly denied anyone has put pressure on them to carry out the expulsions, though diplomatic sources suggest pressure has been exerted.
Thousands of illegal immigrants have congregated in a refugee camp some 100 kilometres (60 miles) from the Djibouti capital along the main road to the Ethiopian capital, Addis Ababa.
Several told AFP news agency of their fears about being forced to return home.
Kibrom Bayru said that as the son of an Ethiopian mother and Eritrean father he fled during the border war between the two countries.
Ahmed Yacin says he was only 10 when Ethiopian police raided his home.
"I was a kid, but I found out later that my father was an activist of the (banned) Oromo Liberation Front," he said.
His Ethiopian mother entrusted him to nomads to lead him to an aunt in Djibouti, where he made a living writing letters in English or Amharic for illiterate compatriots.
Djibouti's capital has been described as a ghost town since people began leaving.