Germany's State-owned rail company Deutsche Bahn said it was planning to transport grain by freight train from Ukraine to Germany's ports.
Russia's invasion of Ukraine - two major global wheat suppliers - has sent prices for grains and other food products soaring. It has stalled Kyiv's exports, leaving dozens of ships stranded and some 20 million tonnes of grain stuck in silos at Odesa.
Deutsche Bahn said it will transform its network that was set up to transport humanitarian aid to bring grain from Ukraine to the German ports of Rostock, Hamburg and Brake near Bremerhaven.
The railway operator plans to run several trains per week and a large part of the grain would be transported via Romania and Poland, the company said, adding that the company couldn't yet quantify how much grain it could transport.
"We will move as much grain as possible," a spokesperson for the company was quoted as saying by DPA news agency which reported the news first.
While some crops have left by rail or road via neighbours such as Romania and Poland, millions of tonnes have piled up on farms and a lack of shipments from Ukraine is pushing up global food prices.
Earlier, Ukrainian infrastructure minister Oleksandr Kubrakov said that Ukrainian agriculture exports rose to 2.5 million tonnes in June from about 1.7 million tonnes in May thanks to higher exports from the Danube river ports.