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.
They can also be reintroduced if there is a rise in unfounded asylum applications, or a lack of cooperation on returning migrants, or if nationals are deemed to pose a security threat.
“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.
Earlier this week, the head of the European Council said the EU was putting its credibility and reputation at risk by letting internal political wrangling stall the promised easing of visa requirements for Ukraine and Georgia.
In a letter sent to European Parliament President Martin Schulz on Tuesday and seen by Reuters, Donald Tusk urged the legislature to compromise with national governments to unblock visa liberalisation.
“At stake here are the legitimate hopes and aspirations of the nations who are our neighbours, as well as the reputation of the European Union, which has categorically and repeatedly committed itself to the issue,” the former Polish premier wrote.
“Even though all the parties in this debate have their own good arguments and undoubtedly good will, it seems we are getting close to squandering our joint efforts,” he added, saying failure to deliver would be “an unforgivable mistake”.