Microsoft founder Bill Gates appealed Wednesday for Britain's leaders to maintain current levels of foreign aid, saying that it is a good investment for both the U.K. and the world.

Speaking to an audience of lawmakers, diplomats and aid workers at the Royal United Services Institute, Gates sought to counter recent arguments that Britain is wasting money abroad and should instead focus on problems at home.

"We can't build a wall to hold back the next global epidemic," Gates said. "We need to combat it, and the underlying socioeconomic problems, at the source. That is what foreign aid does."

The software mogul, who established the Bill & Melinda Gates Foundation, highlighted recent efforts to eradicate polio and combat diseases such as Ebola, saying such work is an investment in the future.

"Because of the U.K.'s investment in the Global Polio Eradication Initiative, 1.6 million people who would otherwise have been paralyzed by polio are living normal lives, and we are now on the verge of eradicating this highly infectious disease forever," he said.

The U.K. spends 0.7 percent of its gross domestic product on foreign aid, meeting the United Nations' target for wealthy countries. But some British politicians have argued that the money could be better spent on schools, health care and poverty programs at home, especially since many other developed nations fail to meet the U.N. target.

Gates' comments followed reports in the British media that some aid money had been spent on questionable projects, or not properly accounted for. While he acknowledged that there is room for improvement, Gates said programs that vaccinate children, educate women and combat poverty should not be abandoned.

He argued instead that 122 million children had lived since 1990 because of development aid.

"As someone who puts $5 billion a year toward development aid, I have a strong interest in making sure that money is well spent," Gates said. "This is especially true because half of that $5 billion comes from Warren Buffet, who hates wasting money even more than I do."