President Trump on Wednesday accused Sen. Lindsay Graham, R-S.C., of wanting to “stay in the Middle East for the next thousand years” as he pushed back against criticism of his decision to remove forces from northern Syria from Graham and others.

Trump was asked at a joint press conference with Italian President Sergio Mattarella about comments by Graham in which the hawkish lawmaker compared Trump's decision to former President Barack Obama’s move to leave Iraq -- which Graham sees as responsible for the rise of ISIS.

TRUMP SAYS TURKEY'S INVASION OF SYRIA IS 'NOT OUR PROBLEM'; KURDS 'ARE NOT ANGELS'

“Lindsay Graham would like to stay in the Middle East for the next thousand years, with thousands of soldiers and fighting other people’s wars. I want to get out of the Middle East,” Trump responded, before referencing to Graham’s role as chairman of the Senate Judiciary Committee.

“I think Lindsay right now should focus on judiciary,” he said.

Trump has faced fierce bipartisan criticism for his decision to move U.S. forces from northern Syria, effectively abandoning Kurdish fighters who have long been allied with the U.S. and clearing the way for an invasion by Turkey, which views the Kurds as terrorists.

The Turkish offensive has led to fears that it could destabilize the region and help ISIS re-establish itself as its fighters escape from Kurdish-run prisons. Trump has since imposed economic sanctions on Turkey, raising steel tariffs as part of an effort to get the country to stop its push into Syria.

But in the face of that criticism, Trump has presented his decision as putting America first by withdrawing troops from a conflict that does not involve American interests. It is, he says, part of his 2016 campaign promise to pull America out of "endless wars" and bring troops home. Vice President Mike Pence this week is traveling to Ankara to meet with Turkish President Recep Tayyip Erdogan.

“I want to bring our soldiers back home, we’re a policing force, not a fighting force,” Trump said Wednesday. Earlier in the day at a press event in the Oval Office, he had also said that “the Kurds know how to fight ... they are not angels.”

TURKISH-BACKED FORCES CAME ‘VERY CLOSE’ TO US TROOPS IN SYRIA, OFFICIAL SAYS

Returning to Graham, Trump said that South Carolinians wish that their senator was focusing on investigating former FBI officials and the conduct of former President Barack Obama during the 2016 election.

“That's what the people of South Carolina want him to focus on, the people of South Carolina don’t want us to get into a war with Turkey, a NATO member, or with Syria,” he said. “Let them fight their own wars, they've been fighting for a thousand years, let them fight their own wars.”

“The people of South Carolina want to see those troops come home and I won an election based on that and that's the way it is, whether it’s good or bad, that’s the way it is,” he said.

CLICK HERE FOR THE ALL-NEW FOXBUSINESS.COM

Graham was subsequently asked about Trump’s remarks and predicted a “national security disaster” over the withdrawal, and urged Trump to listen to his advisers.

"Every national security expert that you have to advise you suggests that if we abandon the Kurds it will hurt us down the road that ISIS is likely to come back and Iran will be the biggest winner," he said.

"You know, the problem with President Trump he talks like [former President] Ronald Reagan and he acts like [Kentucky Sen.] Rand Paul on occasion," he told reporters. "He's got a chance to change this. I would urge him to do so. It's not about me wanting to stay in Syria forever. It's about me wanting to make sure that ISIS does not reemerge."

Fox News’ Andrew O’Reilly, Jason Donner and The Associated Press contributed to this report.