The prohibitions have been in place since 2 May and apply to five members of the European Union located in Ukraine's periphery – Poland, Hungary, Slovakia, Romania and Bulgaria – who complain the grain glut has depressed prices for local farmers.
Under the bans, four products coming from Ukraine: wheat, maize, rapeseed and sunflower, can transit through the five Eastern European countries but cannot stay inside their markets for domestic consumption or storage.
The European Commission has said the restrictions would be phased out by 15 September but no formal decision has been taken yet. The five eastern European countries are pushing for an extension until the end of the year, while the remaining member states and Ukraine are firmly opposed.
The divisions spilled over into the European Parliament during a protracted, bitter and at times emotional debate on Tuesday evening.
Political groups debate ban on grain
Hard-right MEPs, particularly from Poland, forcefully defended a prolongation of the bans, arguing local farmers needed to be protected against the distorting effects of low-cost Ukrainian grain, such as depressed prices and filled-up storages.
"We will not open our borders because we cannot just permit that our farmers will lose everything because of those in Europe who cannot listen to the interests of Polish farmers," said Beata Szydło, from the European Conservatives and Reformists group (ECR). "I have had enough of hypocrisy. I think Polish farmers deserve an apology."
"We are showing solidarity towards Ukraine. We expect the same solidarity being shown to us by the European Commission," said Enikő Győri, a member of Fidesz, the party of Hungarian Prime Minister Viktor Orbán. "We expect that the price of the war shouldn't be paid by our farmers."
Lawmakers from the centre-right European People's Party (EPP), the Socialists and Democrats (S&D), the liberal Renew Europe and the Greens came forth to disagree and said the EU needed to help Ukraine sell its cereals, a key source of revenue for the war-torn nation, and preserve the integrity of its single market.
They also warned the continued quarrel over the bans was playing into Vladimir Putin's hands and his attempt to "blackmail" Europe and trigger an international food crisis.
"Ukrainian grain have been and continue to be a lifeline for many people in third countries facing increasingly good insecurity and hunger," said Petras Auštrevičius, from Renew Europe. "I therefore call on the Commission not to prolong the restrictive measures and to address the infrastructure (problems)."
"The important thing is that the grain and cereals leave Ukraine," said Clara Aguilera, from the socialists. "We're on the side of the good guys, not the bad guys."
Poland 'will not open its borders'
The debate came amidst an increasingly fraught atmosphere that suggests an all-out political crisis might be about to erupt. Poland's hard-right government adopted on Tuesday a resolution threatening to impose a unilateral prohibition on Ukrainian grain if the European Commission decides to lift the bans on 15 September.
"Poland will not allow Ukraine grain to flood us," said Polish Prime Minister Mateusz Morawiecki. "Regardless of what Brussels officials decide, we will not open our borders."
Warsaw's defiant attitude was denounced by several MEPs, who portrayed it as a strategy to win votes of rural regions in next month's national election.
"Unfortunately, some Central European governments exchange their moral and legal obligations to domestic populism," said the EPP's Andrius Kubilius.
"It's not about Polish elections. It's about our responsibility to ensure Ukrainian crops do not rot and people do not starve," said Sergey Lagodinsky, from the Greens.
In a sign of how divisive the issue has turned, Janusz Wojciechowski, the European Commissioner for agriculture, said it was his "strong position" that the bans should be extended until the end of the year, a stance that contradicts the executive's line.
Wojciechowski, who is Polish and affiliated with the ruling Law and Justice (PiS) party, presented again his proposal of a subsidies programme to compensate the additional transport costs that Ukrainian companies are facing and encouraged the bloc to find alternative trading routes through the Danube river and the Adriatic Sea.