WASHINGTON (Reuters) - U.S. President Donald Trump said it was important to keep a U.S. military presence in Iraq so that Washington can keep a close eye on Iran “because Iran is a real problem,” according to a CBS interview to be broadcast on Sunday.

The Republican president lamented “endless wars” in Syria and Afghanistan in an interview with CBS’ “Face the Nation” and made clear he wants to reduce the costly U.S. military presence in those countries despite warnings against such moves from his military advisers and spy chiefs.

The United States could rely heavily on intelligence work in Afghanistan, he said, and respond to developments in Syria from U.S. bases in neighboring Iraq.

Iran’s Revolutionary Guards have sent weapons and thousands of soldiers to Syria to help shore up the rule of Syrian President Bashar al-Assad during a 7-year civil war there.

Trump said the United States has spent a “fortune” on the Al Asad Air Base in western Iraq, which he visited in December, and that the United States should hold on to it.

“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 the CBS interview.

Asked if that meant he wanted to be able to strike against Iran, Trump said, “No, because I want to be able to watch Iran. All I want to do is be able to watch.”

Slideshow ( 2 images )

The president defended his decision in December to withdraw troops from Syria but refused to provide a timetable for the pullout, which drew criticism from members of his own Republican Party and concerns among some allies.

In a rebuke, the Republican-led U.S. Senate advanced largely symbolic legislation on Thursday opposing plans for any abrupt withdrawal of troops from Syria and Afghanistan.

Trump initially said the withdrawal from Syria should be immediate but he has since said it would be gradual.

Some of the forces moving out of Syria will go to Iraq, where they can monitor any resurgence of Islamic State or other militant group and “ultimately some will be coming home,” Trump said.

He said U.S. forces could be deployed again if there is a resurgence of militant groups like al Qaeda. “We’ll come back if we have to,” he said.

Trump said on Thursday he would bring U.S. troops home if a peace deal was reached to end 17 years of war in Afghanistan.

He told CBS he would be open to keeping a small number of troops there as well as intelligence operations to monitor for “nests” of militant activity, according to the interview taped on Friday.

Trump did not say whether he trusted Afghanistan’s Taliban insurgent group but said he believed they want peace.

“They’re tired. Everybody’s tired,” Trump said. “I don’t like endless wars.”