Bill Gates pledged on Thursday to give away $200 billion via his charitable foundation by 2045 and lashed out at Elon Musk, accusing the world's richest man of "killing the world's poorest children" through huge cuts to the U.S. foreign aid budget.

The 69-year-old billionaire co-founder of Microsoft said he was speeding up his plans to divest almost all of his fortune and would close the foundation on Dec. 31, 2045, years earlier than previously planned. Gates said he believed the money would help achieve several of his goals, such as eradicating diseases like polio and malaria, ending preventable deaths among women and children, and reducing global poverty.

His announcement follows moves by governments, including the Trump administration, to slash international aid budgets used to prevent deadly disease and famine.