The European Union said it struck a deal on July 18 with Macedonia to provide border guards to help the Balkan state cope with any surge in migrants attempting to cross into the bloc.
The agreement with Skopje, which hopes to join the EU but is not as yet a member, is part of EU efforts to bolster the bloc's external borders to stem the flow of millions of migrants from the Middle East, Africa, and Asia.
EU Migration Commissioner Dimitris Avramopoulos and Macedonian Interior Minister Oliver Spasovski initialed the deal for deploying EU guards to Macedonia.
Avramopoulos said the agreement, which still must be endorsed by the European Parliament and clear other legal hurdles before going into effect, will enable the EU to "react swiftly" to "sudden migratory challenges."
Officials said the deal was facilitated by Macedonia's settlement of a long-standing name dispute with EU member Greece last month, which has accelerated its bid to join the EU.
Macedonia, Serbia, and other Balkan countries have since 2015 been grappling with the problem of thousands of migrants transiting their territory and seeking to cross illegally into the EU.
Many migrants who do not cross successfully have remained in camps near the border or have slept in city parks or crowded into homeless shelters provided by the financially pressed Balkan governments.
While the EU has provided Balkan countries with some aid to help cope with the migrant influx, its principal strategy has been to try to stop them from crossing into the EU.
The EU has previously negotiated cooperation deals with Turkey and Libya to slash the number of asylum seekers and migrants seeking to enter via those countries.
The EU this year is increasing the number of border guards and coast guard personnel to 1,300, up from 300 in 2014, and plans to expand the staff further to 10,000.