KYIV: Canada will help Ukraine work out options on how to export stored grain to uphold global food security that has been shaken by Russia's invasion of the country, Canadian Prime Minister Justin Trudeau said late on Sunday.

Nearly 25 million tonnes of grains are stuck in Ukraine and unable to leave the country due to infrastructure challenges and blocked Black Sea ports including Mariupol, a U.N. food agency official said last week. Mariupol has endured the most destructive fighting of the 10-week war.

Food prices soared to record highs in March in the wake of Russia's invasion of Ukraine, the world's No.4 exporter of maize (corn) in the 2020/21 season and the No.6 wheat exporter. Prices eased slightly in April.

"We know people around the world are going to be starving because of the actions of Russia," Trudeau told Reuters in an interview.

"There is grain waiting to be shipped in Ukraine. We have to make sure that Russia doesn't prevent the grain that the world needs from getting out to the world."

Since Moscow launched what it calls a "special military operation" in Ukraine in late February, the latter has been forced to export grain by train over its western border.

Kyiv has also been looking to use ports on the Danube river in the country's south to help with exports.

Shipments via Danube river ports could be part of the solution, Trudeau said, not revealing details, but adding that a number of options was being considered.

"We're just looking to solve a very direct problem."

Analysts have warned that Ukraine will face a significant shortage of storing facilities in the 2022/23 season due to a sharp fall in exports.

Trudeau, in an unannounced visit to Ukraine, said after his meeting with President Volodymyr Zelenskiy on Sunday that Canada was providing $25 million to the U.N.'s World Food Programme as part of efforts to uphold food security.

Canada will also remove trade tariffs on all Ukrainian imports to Canada for next year.

"It doesn't serve anyone if Vladimir Putin's war is not just killing Ukrainians, but is starving people around the world," Trudeau told Reuters, referring to Russia's president.

(Reporting by Tom Balmforth, writing by Lidia Kelly in Melbourne; Editing by Himani Sarkar)