Pushing back against Republican opposition, US President Donald Trump reaffirmed his determination to pull US troops out of "endless wars" in Syria and Afghanistan, in an interview that aired Friday.
But he said they would stay in Iraq to watch Iran.
Trump cited the high cost in blood and money after years of fighting in Afghanistan, in arguing for a US withdrawal from the place where the 9/11 attacks were hatched.
"It's time," he said in the interview with CBS's Face the Nation. 
"And we'll see what happens with the Taliban. They want peace. They're tired. Everybody's tired."
Trump's comments come in the face of warnings by US intelligence chiefs that a hasty US withdrawal from Afghanistan and Syria could allow a resurgence by Al Qaeda and the Islamic State group.
On Thursday, the US Senate voted overwhelmingly for a measure sponsored by Mitch McConnell, the majority leader of Trump's Republican party, warning against a "precipitous withdrawal" from either country.
But Trump appeared unmoved by the rare Republican pushback, noting that his promises to bring US troops home was "a big part" of the reason he was elected.
On Syria, Trump said the 2,000 US troops in the country to assist local forces would leave "in a matter of time" but cited the need to protect Israel "and other things that we have" for slowing down - after initially announcing an immediate pullout.
He said he will soon be announcing the recapture of "100 % of the caliphate" once claimed by the Islamic State group in Iraq and Syria.
"We're at 99 % right now. We'll be at 100," said the president, who was expected to make the announcement during his annual State of the Union address on Tuesday.
In a report to Congress last week, US intelligence leaders warned that IS still commands thousands of fighters in Iraq and Syria, and they could easily spring back in the absence of US forces.
Trump responded by rebuking as "naive" and "wrong" his intelligence chiefs, who also had appeared to contradict him on Iran and North Korea.
In the CBS interview, he played down the danger of an extremist resurgence but said "we'll come back if we have to."
"You're going to always have pockets of something," he said.
"But you're not going to keep armies there because you have a few people. Or you even have fairly reasonable numbers of people."
However, the United States will not give up its bases in Iraq, he said.
"We spent a fortune on building this incredible base. We might as well keep it. And one of the reasons I want to keep it is because I want to be looking a little bit at Iran because Iran is a real problem," he said.
In Afghanistan, Trump said he would leave behind intelligence elements - "and if I see nests forming, I'll do something about it."
"We got to get out of these endless wars and bring our folks back home," he said at another point.
"Now, that doesn't mean we're not going to be watching with intelligence. We're going to be watching, and watching closely."


Related Story