The European Commission said on Friday it had reached a deal in principle to allow the transit of Ukrainian grain to resume through five European Union countries that had imposed restrictions.

Bulgaria, Hungary, Poland, Romania and Slovakia had imposed the measures citing concerns that grain from Ukraine meant to be exported to other countries had ended up in their local markets, which was pushing down prices for local farmers.

European Commission Vice President Valdis Dombrovskis tweeted that the EU executive had reached “an agreement in principle” with the five countries “to address concerns of both farmers in neighbouring EU countries and Ukraine”.

He said the deal included “safeguard measures” for four products – wheat, maize, rapeseed and sunflower seed. He did not provide any further details on the measures.

The deal also includes a support package worth 100 million euros ($110.25 million) for local farmers, Dombrovskis said.

The five countries became transit routes for Ukrainian grain that could not be exported through the country’s Black Sea ports because of Russia’s February 2022 invasion.

Bottlenecks then trapped millions of tons of grains in countries bordering Ukraine, forcing local farmers to compete with an influx of cheap Ukrainian imports that they said distorted prices and demand.

European Commission President Ursula von der Leyen said the deal “preserves both Ukraine’s exports capacity so it continues feeding the world, and our farmers’ livelihoods”.