WASHINGTON - President Trump sought Thursday to defend his decision to withdraw all U.S. military forces from Syria amid a widespread backlash from lawmakers in both parties and fresh praise from Russian President Vladimir Putin.

In morning tweets, Trump selectively quoted lawmakers and political pundits who agreed with him and argued that the withdrawal was the fulfillment of a campaign pledge and that the United States should not play the role of "Policeman of the Middle East."

"Getting out of Syria was no surprise. I've been campaigning on it for years, and six months ago, when I very publicly wanted to do it, I agreed to stay longer," Trump said in his tweets, adding: "Do we want to be there forever?"

Trump said it was time for others in the region to step up against the Islamic State terrorist group and other hostile forces, saying the United States is "getting NOTHING but spending precious lives and trillions of dollars protecting others who, in almost all cases, do not appreciate what we are doing?"

His tweets came a day after Trump justified pulling out of Syria by claiming that the United States had defeated the Islamic State, an assertion that was widely criticized as premature and risked future aggression in the absence of U.S. forces.

The move plunged U.S. allies into uncertainty and created the potential for greater regional instability even as it provided Russia and its ally, Syrian President Bashar al-Assad, a chance to cement greater control over the country amid a civil war.

As Trump was tweeting from the White House, Putin, at his annual year-end news conference, said that the Islamic State had suffered "serious blows" in Syria and praised Trump's decision to withdraw U.S. forces.

"On this, Donald is right. I agree with him," Putin said.

Russia - Assad's most powerful ally - turned the tide in the civil war in Assad's favor and has maintained its military presence there.

In one of his tweets, Trump quoted two Republican lawmakers who agreed with his decision, Sens. Rand Paul of Kentucky and Mike Lee of Utah.

"I'm proud of the President today to hear that he is declaring victory in Syria," Trump quoted Paul as saying. "I couldn't agree more with the presidents decision," Trump quoted Lee as saying.

He made no mention of criticism coming from Capitol Hill, including a letter sent by a bipartisan group of six senators, including Lindsey Graham, R-S.C., one of the president's closest allies in the Senate.

The letter asked Trump to reconsider, warning that withdrawing U.S. troops from Syria would "renew and embolden" the Islamic State, also known as ISIS, in the Middle East.

During a morning television appearance, House Minority Whip Steny Hoyer, D-Md., called Trump's decision "impulsive, irresponsible and dangerous."

"I would hope that the president would reconsider," Hoyer said on CNN. "The only people happy today about this decision are, in my opinion, the Syrians, the Iranians, the Russians and ISIS and its allies. It was a terrible decision that puts our country in a bad spot."

"It encourages ISIS, it doesn't defeat ISIS," Hoyer added.

On Twitter, Sen. Chris Murphy, D-Conn., questioned how Trump could assert on Wednesday that the Islamic State had been defeated while asserting in his tweets on Thursday that others in the region would now have to fight the terrorist group without the United States.

"But wait a minute...I thought we defeated ISIS," Murphy wrote. "Why would Russia, Iran and Syria have to fight them if they're defeated?"

In his tweets, Trump seemed to dismiss such concerns, writing: "I am building by far the most powerful military in the world. ISIS hits us they are doomed!"

As part of his defense of his decision, Trump quoted Fox News host Laura Ingraham in an earlier tweet, posted shortly after midnight, saying that Trump "gets no credit" for his efforts in the Middle East.

"So true, thank you Laura!" Trump added in his own words.

But such praise was hardly universal from usually Trump-friendly pundits.

On Thursday morning on Fox News, "Fox & Friends" host Brian Kilmeade ripped into the decision, calling it a "stunning and irresponsible move."

"Nobody thinks ISIS is defeated," Kilmeade told viewers.

The Washington Post’s Anton Troianovski in Moscow and Timothy Bella in Washington contributed to this report.