The Group of Seven leading economies have warned that the war in Ukraine is stoking a global food and energy crisis that threatens poor countries, and urgent measures are needed to unblock stores of grain that Russia is preventing from leaving Ukraine.

German foreign minister Annalena Baerbock, who hosted a meeting of top G7 diplomats, said on Saturday the war had become a “global crisis”.

Baerbock said up to 50 million people, particularly in Africa and the Middle East, would face hunger in the coming months unless ways are found to release Ukrainian grain, which accounts for a sizeable share of the worldwide supply.

In statements released at the end of the three-day meeting on Germany’s Baltic Sea coast, the G7 pledged to provide further humanitarian aid to the most vulnerable.

Canada’s foreign minister, Melanie Joly, said her country, another major agricultural exporter, stands ready to send ships to European ports so Ukrainian grain can be brought to those in need.

The G7 nations also called on China not to help Russia, including by undermining international sanctions or justifying Moscow’s actions in Ukraine.