President Trump has met resistance from both parties after his decision to withdraw troops from northern Syria, but some of the rhetoric coming from Democrats is almost the opposite of what came from party members when President Barack Obama pulled forces out of Iraq.

California Democrats Rep. Maxine Waters and House Speaker Nancy Pelosi, for example, have been vocal opponents of Trump's troop withdrawal, after supporting Obama's efforts almost exactly eight years later.

ERDOGAN THREW TRUMP'S 'DON'T BE A FOOL' LETTER IN THE TRASH, SOURCES CLAIM

“As the war in Iraq draws to a close, it is my hope that this conflict will serve as a solemn reminder of the costs of war,” Waters said in a statement issued Oct. 21, 2011. “We must carefully reexamine our approach to national security and how we view the United States' role in promoting international peace and security. If we are to remain leaders in the world, we must always use our best judgment to determine when and how we engage other nations and other actors – particularly if we are considering the use of military force.”

Waters’ approach to the United States’ role in world affairs is similar to Trump’s recent warnings against “fighting other people’s wars.”

Cut to Oct. 7, 2019, and Waters blasted Trump for leaving Kurdish forces to fend for themselves against Turkish attacks.

“If the United States abandons the Kurds, these courageous allies will never trust us again,” Waters said in a statement, adding that “Trump’s betrayal of the Kurds is a gift to Russia, Iran and ISIS.”

That same day, Pelosi came out against Trump, warning that leaving northern Syria could lead to an ISIS resurgence.

DEMS STORM OUT OF SYRIA MEETING WITH TRUMP: 'WE HAVE TO PRAY FOR HIS HEALTH'

“This reckless, misguided decision undermines the efforts by our brave servicemembers and our allies to end ISIS’s tyranny,” she said.

But while Republicans had similar concerns about withdrawing from Iraq in 2011, Pelosi praised Obama “for a promise made and a promise kept, honoring the U.S.-Iraq Security Agreement and the wishes of the American people to bring all our troops home by the end this year.”

Pelosi stormed out of a meeting with Trump Wednesday after what she said was a "meltdown" by the president.

One of the Democratic frontrunners for the 2020 presidential nomination, Sen. Bernie Sanders, I-Vt., was also critical of Trump, despite being historically anti-war.

“You don’t turn your back on an ally that lost 11,000 troops fighting against terrorism through a tweet and a discussion with Erdogan,” Sanders told ABC’s George Stephanopoulos. This criticism came despite Sanders acknowledgment that “I am a strong opponent of endless wars.”

That position was made evident in 2011 when Sanders backed Obama’s Iraq withdrawal.

“I applaud the president's decision and have been advocating that position for quite a while,” adding, “Now is the time to bring our troops home, lower our military budget, and use those funds to create jobs by rebuilding our infrastructure and lowering our national debt."

On Thursday, Trump vented about Democratic criticism. "I am the only person who can fight for the safety of our troops & bring them home from the ridiculous & costly Endless Wars, and be scorned. Democrats always liked that position, until I took it," he said.

Republicans have been equally critical of Trump, with 129 GOP members voting for a resolution in opposition to the withdrawal, joining a unanimous Democratic contingent. Sen. Lindsey Graham has been particularly vocal, leading Trump to accuse the senator of wanting to “stay in the Middle East for the next 1,000 years.”

CLICK HERE TO GET THE FOX NEWS APP

Graham, however, was no supporter of Obama, and lumped Trump and his predecessor together in making what he believes to be critical foreign policy errors.

“President Trump is being told EXACTLY what President Obama was told before he withdrew from Iraq,” Graham tweeted Wednesday. “He appears to be hell-bent on making the same mistakes in Syria as President Obama made in Iraq.”