Bulgaria, Hungary, Poland, Romania and Slovakia have agreed a deal to allow the transit of Ukrainian food exports, the European Commission said Friday, after temporary bans were imposed on the foodstuffs amid farmer protests.

Russia's invasion has severely limited the traditional export channel of Ukrainian grain via the Black Sea, necessitating export overland via Ukraine's neighbours.

Member states agreed to allow the import of certain products from Ukraine without quantitative restrictions, and without customs and official inspections.

But farmers in Ukraine's neighbours Hungary, Poland and Slovakia protested after a slump in prices, prompting a raft of restrictions and bans on Ukraine's food exports in response.

"(The) EU Commission has reached an agreement in principle with Bulgaria, Hungary, Poland, Romania and Slovakia regarding Ukraine agri-food products," EU Trade Commissioner Valdis Dombrovskis tweeted.

The deal will see the lifting of "unilateral measures by Poland, Slovakia, Hungary and Bulgaria. Exceptional safeguard measures for... wheat, maize, rapeseed, sunflower seed (and) a 100 million euros ($110 million) support package for affected farmers in (the) five Member States".

"We have acted to address concerns of both farmers in neighbouring EU countries and Ukraine."

As soon as the Polish ban was announced, Ukrainian sunflower oil manufacturers stopped buying seeds for lack of a guarantee of being able to export their production to the EU.

The tensions between Kyiv and its European neighbours arose as uncertainty looms over the scheduled May 18 renewal of a deal ensuring the Black Sea grain corridor is operational.