Refugees are rushing to leave Hungary ahead of new stricter immigration controls coming into effect.
Prime Minister Victor Orban announced that anyone illegally crossing the border will be arrested starting from Tuesday.
Many began the anxious wait to board the last trains heading to Germany and Austria before the deadline.
“We need to get them out of Hungary as soon as possible before the military enter into the situation and try to solve it. So we need to get all the refugees out of Budapest as soon as possible, before 15th,” said a volunteer Mashaal Al-Hajri.
The Hungarian army began exercises on Wednesday in preparation for a role in guarding the borders.
The authorities are racing to erect a razor-wire fence due for completion early October to stem the numbers of people arriving in the country, many of whom are fleeing conflict in Syria and Libya.