Thousands of migrants have stormed across Macedonia’s southern border with Greece just days after the Macedonian government closed the border and declared a state of emergency.

Police lobbed stun grenades and hit some of the infiltrators with batons, but were unable to stem the tide and soon stood aside completely.

Most of the migrants are Syrians, Afghans and Iraqis fleeing fighting in the region and will have crossed the Mediterranean into Greece by boat.

However, in order to reach fellow EU states, migrants must journey north through Macedonia and Serbia before reaching the southern border of Hungry and with it, the borderless Schengen Zone.

Those making the journey face a race against the clock, as earlier this summer Hungary announced it was building a 13ft high, 110 mile long razor-wire topped fence along its southern border in a bid to stem the flow of people, to be completed by December.

Since the announcement was made, the number of people using the Balkan route has surged.

In recent weeks as many as 3,500 people a day have been using this route, crossing into Macedonia illegally. The situation reached a head on Thursday when the government declared a state of emergency and closed its southern border, forcing thousands of migrants to camp out in open fields in the rain.

Macedonia’s Foreign Minister Nikola Poposki told the BBC the situation had “dramatically deteriorated”.

He said: “In the last several days there has been a dramatic increase of inflow of migrants and we have reached numbers of 3,000 to 3,500 per day which obviously is not something a country of two million people and our resources can handle on a daily basis.

“We had to reinforce the control of illegal entry of Macedonian territory.”

Macedonia is known to take a hard line against the migrants; the country’s state media have criticised Athens for chartering ships to take migrants from Greek islands to the mainland.

Macedonian security forces had been expected to let 600 migrants in at a time on Saturday to coincide with train departures north towards Serbia and the rest of Europe.

But by Saturday morning, some migrants were making a break for it across open fields near the town of Geveljia, where police presence was thinner on the ground. Police initially gave chase and turned a few back, but thanks to the sheer number of migrants were soon overwhelmed.

As evening fell, just 200 people were left behind a fenced area on the border, the New York Times has reported. Some utilised taxis and private buses to press northwards towards Serbia, but the vast majority joined more than 2,000 migrants already waiting for trains to Serbia and Hungry at Geveljia train station.

Although it has been assumed that police simply gave up on holding the line, others have questioned whether the government reversed its closure of the border, pointing to a large number of buses and vans that suddenly appeared in the town to take migrants onwards.

The UN’s refugee agency, the UNHCR has urged Macedonia to “establish an orderly and protection-sensitive management of its borders”, simultaneously urging Greece to “enhance registration and reception arrangements” on its side of the border.

The organisation also claims to have had assurances from Macedonia that the border “will not be closed in the future”.