President Donald Trump defended his plan to withdraw U.S. troops from Afghanistan and Syria Friday after the Republican-controlled Senate issued a rare rebuke to the president on the issue Thursday.

“I inherited a total mess in Syria and Afghanistan, the ‘Endless Wars’ of unlimited spending and death,” Trump wrote on Twitter Friday. “During my campaign, I said, very strongly, that these wars must finally end. We spend $50 Billion a year in Afghanistan and have hit them so hard that we are now talking peace… after 18 long years.”

“Syria was loaded with ISIS until I came along,” he added. “We will soon have destroyed 100% of the Caliphate, but will be watching them closely. It is now time to start coming home and, after many years, spending our money wisely. Certain people must get smart!”

The U.S. has lost more than 2,400 soldiers and spent nearly $1 trillion since entering Afghanistan in 2001, according to Military Times. U.S. deployment to the country peaked at “some 100,000 U.S. personnel in the country” in 2011, reported BBC.

There were roughly 2,000 U.S. troops in Syria “working as advisers to the Syrian Defense Forces or providing other support to local militias battling the Islamic State” as of April 2018, reported USA Today.

The Senate voted 68-23 to rebuke a “precipitous withdrawal” from the two countries. The resolution was sponsored by Senate Majority Leader Mitch McConnell, who is often in the president’s corner. The bill’s stated purpose was:

To express the sense of the Senate that the United States faces continuing threats from terrorist groups operating in Syria and Afghanistan and that the precipitous withdrawal of United States forces from either country could put at risk hard-won gains and United States national security.

(Article Continues Below Advertisement)

A member of the Air Force secures the remains of Scott A. Wirtz, a Defense Intelligence Agency civilian and former Navy Seal, in a vehicle during a dignified transfer for US personal killed in a suicide bombing in Syria, at Dover Air Force Base January 19, 2019 in Dover, Delaware. (BRENDAN SMIALOWSKI/AFP/Getty Images)

Ironically, many of the Senate’s most progressive members sided with Trump. “Prospective” Democratic presidential candidates including Vermont Sen. Bernie Sanders, Massachusetts Sen. Elizabeth Warren and New York Sen. Kirsten Gillibrand have endorsed Trump’s plan to withdraw troops from Afghanistan and Syria, reported The New York Times.

The Senate’s Thursday rebuke is largely symbolic but is expected to be rolled into “a broader bipartisan Middle East policy bill expected to easily pass the Senate next week,” according to The Times.

The U.S. has been a large part of a NATO coalition fighting the Taliban in Afghanistan since 2001. The U.S. intervened in the Syrian Civil War along with other countries including the United Kingdom and France in 2014.

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact [email protected]