Officials said the deal had been struck on Thursday to end an internal EU dispute that had been holding up the promised measures.

Late-night talks involving EU member states and the European Parliament had reached a compromise on the terms of a mechanism which can be used to suspend the visa-free schemes in emergencies.

The deal on visa suspension must still be formally approved by the member states and the European Parliament.

The deal struck between the European Parliament and the member states “will facilitate the immediate consideration of the two visa liberalisation proposals for Georgia and Ukraine,” MEP Agustin Diaz de Mera said.

Under the deal, visa requirements may be reintroduced if there is a surge of citizens from a non-EU country such as Ukraine or Georgia staying irregularly in EU territory.

“This agreement is balanced, and is extremely important for both the effectiveness and credibility of the union’s visa liberalisation policy,” Slovak Interior Minister Robert Kalinak said.

“The current suspension mechanism is not adequate and will now be improved,” Mr Kalinak added.

“The fact that we have reached an agreement should open the door to further progress on visa liberalisation talks with other countries that meet all the necessary requirements,” he said.

The two former Soviet republics of Ukraine and Georgia are seeking to move further away from their former master Moscow and closer to the West.

However, they have grown frustrated that the EU was failing to deliver.

After last year’s refugee crisis, EU governments had grown nervous of the popular reaction led by anti-immigration parties against a move to make visits easier for 45 million Ukrainians, as well as 5 million Georgians.

Allowing them to travel into Europe’s Schengen zone without applying in advance for visas was an important incentive for people there to accept hard reforms from the governments in Kiev and Tbilisi as they sought closer relations with the EU.