BRUSSELS (Reuters) - European Union states agreed on Thursday to waive visas for Ukrainians on short visits, but only after the bloc beefs up a mechanism to suspend visa-free agreements in an emergency.

Ukraine, a former Soviet republic, has fostered closer ties with the EU since Moscow annexed its Black Sea peninsula of Crimea in 2014 and started backing rebels fighting Kiev’s troops in the east of the country.

Many difficulties to progress remain, not least Ukraine’s sluggish fight against endemic corruption and the EU’s caution on immigration after the arrival of about 1.3 million refugees and migrants in 2015, mainly from the Middle East and North Africa.

But, a week before an EU-Ukraine summit on Nov. 24, EU states gave their conditional backing to allowing Ukrainians to travel visa-free to the bloc for short visits.

Implementation, however, will take time as further negotiations are needed between the EU states, the European Parliament and the bloc’s executive European Commission.

The decision on Thursday also says visa liberalization for Ukraine should not take effect until after the bloc - wary of a repeat of last year’s refugee influx - rolls out a beefed-up mechanism to lift any visa waivers in case of emergency.

Talks on the so-called suspension mechanism have been making slow progress and diplomats say it could take weeks before it is in place.