“Closure!” barks the Hungarian army officer shortly after midnight, prompting the soldiers to unfurl the final length of the country’s new anti-migrant fence and attach it to steel columns -- and the border with Croatia is officially sealed.
Behind the wire, a group of migrants disappears into the gloomy darkness toward Zakany station where a train waits to bring them to Austria.
They are the last of around 1,500 people to make it through just before the shutdown, ordered by Budapest barely a month after it also sealed its border with Serbia to stem the huge refugee influx.
Since then, some 185,000 migrants have crossed into the country from Croatia, many through a field at Zakany.
But this route is now no longer an option after thousands of soldiers, guards and even prisoners finished building the barrier along the 350-kilometre (215-mile) long Croatian frontier.
“We can go home soon at last, it’s been tough work,” a prison guard tells AFP next to the barrier in Zakany where he and a dozen colleagues wait for the final arrivals from Croatia.
Suddenly the faint sound of Arabic is heard in the distance on the Croatian side. Then out of the darkness some migrants appear, walking in a single file as they are escorted by Croatian police toward Hungary.
The crowd remains mostly silent, with many coughing and some children crying.
“Blue line, blue line!” shout the Hungarian police, an instruction to keep within a narrow cordoned-off track, as the migrants shuffle slowly across the border.
Stuck in the mud
The young men and families glance warily at the coils of sharp razorwire placed either side of the gap, while dozens of soldiers and police watch on in silence.
Recent rain has turned the ground into a quagmire of squelching mud and puddles. Many of the older people look appalled when they realise they have to wade through it ankle-deep to the train station some 700 metres in the distance.
People lift a wheelchair carrying an old woman after it gets stuck in the mud, while a parent struggles to free a child’s buggy.
“Thousands have been coming here every day for weeks, yet no one bothered to put down some gravel or planks of wood for them to walk on,” an angry aid worker tells AFP.
Then a generator fails and the scene is plunged into pitch darkness. When the light returns after 10 minutes, it appears several have lost their balance and fallen, their clothes more mud-splattered than before.
None of those asked by AFP were aware that they were part of the last group of migrants to be let into Hungary, nor that Croatia had decided to bus people to Slovenia.
“My uncle is following behind, he’s in Greece now, how will he get through!” frets Negin, a 23-year-old artist who left Iran a month ago after she was raped by a policeman.
“I don’t care anymore about my clothes, I lost my own ones weeks ago, what I’m wearing I was given by others,” she smiles before gingerly stepping forward.