Hungarian authorities have seized a train bringing refugees into the country from Croatia, disarming 40 police onboard and detaining the driver after more than 4,000 refugees arrived across their border, the head of the Hungarian disaster unit has said.

Gyorgy Bakondi said on Friday that the Croatian train that brought the refugees to Magyarboly came without any prior notice, like the rest of the new arrivals coming on other trains and buses.

Hungary registered and disarmed the 40 police who escorted the train, he said, according to a video posted on M1 state television’s website.

Zoltan Kovacs, government spokesperson, said the incident was “a very serious border violation”.

In Depth: Opening the doors to thousands of Syrians

“A very serious border incident has happened because a train arrived in Magyarboly, which had more than a thousand onboard, without any warning and was accompanied by 40 Croatian policemen into Hungarian territory without any prior notice and permit, which is a very serious border violation and there are suspicions of crimes.”

“An investigation is under way into this. The driver of the train has been arrested, and my Hungarian colleagues have taken action in relation to the 40 Croatian policemen.”

However, Croatian police said none of its officers escorting the train had been disarmed or arrested.

“There was no disarming or arrests. It is not true. There was an agreement about the escort between the police officers from the two sides in advance,” police spokeswoman Jelena Bikic told Reuters news agency.

The police said that 36 officers returned to Croatia in the evening.

Borders closed

Earlier on Friday, Croatia had given warning that it will close all border crossings in a bid to bar refugees from entering after about 13,000 crossed into the country over the last three days.

The Balkan nation has already closed seven out of eight of its border crossings with Serbia.

Croatia has also blocked refugees – most of whom had fled conflict in Syria and Iraq – from leaving for Slovenia en route to western European countries, such as Germany, leaving many of them stranded along the border.

“Up until now, we have registered 13,000 migrants on Croatian territory,” Ranko Ostojic, the Croatian interior minister, said on Friday.

“This figure means that our capacities to take in more are saturated.”

Serbian officials, fearing that the closures would confine too many refugees inside their country, protested against Croatia’s move.

Aleksandar Vulin, Serbia’s social affairs minister, said Serbia will take Croatia to international courts if the border crossings remain closed, arguing that it should have been prepared for the influx.

“We will not pay the price of someone else’s incapability,” Vulin said. “I am sorry to see that Croatian humanity and solidarity lasted just two days.”

However, despite the border closures, many continued entering Croatia through cornfields.

Women carrying children and people in wheelchairs were among the thousands rushing in the heat in hopes of finding refuge.