Trump's pledge came during a working session of the G20 summit of world leaders in Hamburg, providing a "godsend" to the U.N. World Food Programme, the group's executive director, David Beasley, told Reuters on the sidelines of the meeting.

U.S. President Donald Trump on Saturday promised $639 million in funding for humanitarian programmes, including $331 million to help feed starving people in four famine-hit countries - Somalia, South Sudan, Nigeria and Yemen.

President Donald Trump and First Lady Melania Trump (not pictured) arrive at Hamburg Airport for the Hamburg G20 economic summit on July 6, 2017 in Hamburg, Germany.

"We're facing the worst humanitarian crisis since World War Two," said Beasley, a Republican and former South Carolina governor who was nominated by Trump to head the world's largest humanitarian agency fighting hunger worldwide.

He said the additional funding was about a third of what the agency estimated was required this year to deal with urgent food needs in the four countries facing famine and in other areas.

The WFP estimates that 109 million people around the world will need food assistance this year, up from 80 million last year, with 10 of the 13 worst affected zones stemming from wars and "man-made" crises, Beasley said.

"We estimated that if we didn't receive the funding we needed immediately that 400,000 to 600,000 children would be dying in the next four months," he said.

Trump's announcement came after his administration proposed sharp cuts in funding for the U.S. State Department and other humanitarian missions as part of his "America First" policy.

Beasley said the agency had worked hard with the White House and the U.S. government to secure the funding, but Trump would insist that other countries contributed more as well.

A WPF spokesman said Germany recently pledged an additional 200 million euros for food relief.

The United States has long been the largest donor to the WFP.

Follow CNBC International on Twitter and Facebook.