President Donald Trump expressed his displeasure with the ongoing war in Afghanistan at a meeting with Prime Minister Imran Khan of Pakistan on Monday but acknowledged he would continue the lengthy process of extracting the United States from the country.

“We’ve been there 19 years in Afghanistan. It’s ridiculous,” Trump said. “We’ve been in there not fighting to win. … They’re building gas stations. They’re rebuilding schools. The United States, we shouldn’t be doing that. That’s for them to do.”

The president claimed during the meeting that he could win the war in a week to ten days but that the strategy would result in the deaths of millions of people.

“If we wanted to fight a war in Afghanistan and win it, I could win that war in a week. I just don’t want to kill ten million people,” Trump said. “If I wanted to win that war, Afghanistan would be wiped off the face of the earth. It would be over in literally ten days.”

Trump said he no longer wants the United States to employ forces in Afghanistan as “policemen” in the world and stated that he continues withdrawing some forces. He also signaled hope that Pakistan could help secure peace in the region.

Prime Minister Kahn said there is “no military solution in Afghanistan” and that he would work with Trump and the Taliban to come up with a political solution for the United States to get out of the war.

Since Trump became president, he has worked to reduce the number of forces in Afghanistan.

In an interview with Time magazine in June, he said he decreased the number of forces from 16,000 American troops to 9,000 since he became president.

The president has campaigned on ending the war in Afghanistan, noting that the United States would be better served by spending the money used to conduct the lengthy campaign to fund U.S. projects.

“Nineteen years we spend more on military in Afghanistan–$50 billion a year–than most countries spend on their entire country,” Trump said during a Texas rally in February. “Health care, education, everything, we spend more than they do. It’s time to start thinking smart for our country.”