Hungary closed its border with Croatia at midnight (2200 GMT) Friday to contain the flow of thousands of migrants arriving daily in the country, before traveling to northern Europe.
A final group of several hundred migrants was permitted to cross the border shortly before it was sealed off at midnight local time. A fence along the frontier has already been built to prevent unauthorized crossings.
Hungarian Foreign Minister Peter Szijjarto announced the decision to seal the border after a meeting of the national security cabinet earlier Friday.
He said that Budapest had informed its border countries and beyond about its decision. Hungary sealed the border with Serbia in September with fences.
In response to the Hungarian move, Slovenia announced Friday that it is suspending all train services to Croatia. The flow of people is expected to shift to Slovenia when Hungary closes its border with Croatia for migrants.
Slovenia said it would continue to accept the migrants but wants to control the influx. Instead of transporting the new arrivals to its borders, the trains will deliver them to refugee centers.
More than 380,000 migrants have entered Hungary in 2015 and Hungarian authorities anticipate the number to exceed 700,000 by the end of the year.
FILE - Hungarian Foreign Minister Peter Szijjarto speaks with the media as he arrives for a meeting of EU foreign ministers at the EU Council building in Luxembourg, Sept. 4, 2015
Meanwhile European Union leaders meeting at a summit in Brussels into the early hours of Friday approved an “action plan” with Turkey, in hopes of easing the flow of migrants to Europe.
Turkey's president, Recep Tyyip Erdogan, criticized the EU Friday for not taking in more refugees, despite the action plan, which Foreign Minister Feridun Sinirlioglu said was not finalized.
Under the plan, Turkey would agree to apprehend people-smugglers and take measures to keep refugees from entering Europe.
In turn, the EU would agree to accelerate the visa process for Turkish citizens wanting to visit the European Union and reopen talks on Turkey's membership to the bloc.
Turkey had also demanded $3.4 billion in new aid but European Commission President Jean-Claude Juncker said the figure would have to be negotiated.
Afghan migrants arrive on the shores of the Greek island of Lesbos after crossing the Aegean sea from Turkey on a inflatable dinghy, Sept. 25, 2015.
Afghan refugee shot
In a related development, Bulgarian President Rosen Plevneliev says he "deeply regrets" the fatal shooting of an Afghan refugee by Bulgarian border police and says the event shows the need for rapid action by the European Union to ease the refugee crisis.
Plevneliev told reporters Friday that he calls on the EU to institute "rapid common measures to tackle the roots of the crisis" and asks asylum seekers to respect European and Bulgarian laws.
The refugee was among a group of more than 50 migrants spotted by patrols near the Turkish border on Thursday, said the Bulgarian interior ministry. Ministry official Georgy Kostov said officers fired warning shots into the air and one of them ricocheted and hit a migrant, injuring him. He later died of his injuries.
The incident is believed to be the first fatal shooting of a migrant by a border guard since the migrant crisis began earlier this year.
After getting word of the incident, Bulgarian Prime Minister Boris Borisov made an early exit from a European Union summit Thursday, heading home to deal with the issue.
Nearly 600,000 migrants have reached the EU by sea, many of them travelling from Turkey to Greece before seeking to head north.
The migrant crisis has already claimed the lives of more than 3,000 people this year. Most drowned while making the dangerous crossing of the Mediterranean as they flee conflict and repression in the Middle East and elsewhere.