President Donald Trump announced he would withdraw American forces from Syria, allowing Turkish forces to enter the country.

The White House revealed Trump’s decision Sunday night and the president also shared his thoughts on the issue on Twitter on Monday.

“I held off this fight for almost 3 years, but it is time for us to get out of these ridiculous Endless Wars, many of them tribal, and bring our soldiers home,” Trump wrote on Twitter.

Trump said he would allow Turkey to engage in Syria, despite the American alliance with the Kurds in the region. In return, he said, Turkey would take all of the captured Islamic State terrorists.

The White House announced the deal after Trump spoke with President Recep Tayyip Erdogan of Turkey.

“Turkey will now be responsible for all ISIS fighters in the area captured over the past two years in the wake of the defeat of the territorial “Caliphate” by the United States,” the White House said in a statement.

Trump has tried to withdraw troops from Syria since destroying the Islamic State but has faced stiff resistance.

Jim Mattis, Trump’s first Defense Secretary, resigned in December in protest of the president’s decision to withdraw troops from Syria.

Trump’s decision earned criticism from some members in the foreign policy establishment, as they believe the Kurds deserve protection from Turkey, as a result of their efforts to fight the Islamic State.

Former Ambassador to the United Nations Nikki Haley criticized Trump on Twitter on Monday after his announcement.

We must always have the backs of our allies, if we expect them to have our back. The Kurds were instrumental in our successful fight against ISIS in Syria. Leaving them to die is a big mistake. #TurkeyIsNotOurFriend — Nikki Haley (@NikkiHaley) October 7, 2019

Sen. Lindsey Graham called Trump’s decision a “disaster” and appeared on Fox News this morning to criticize the president’s move.

I don’t know all the details regarding President Trump’s decision in northern Syria. In process of setting up phone call with Secretary Pompeo. If press reports are accurate this is a disaster in the making. — Lindsey Graham (@LindseyGrahamSC) October 7, 2019

But Trump reemphasized his “American first” foreign policy priorities on Twitter.

“WE WILL FIGHT WHERE IT IS TO OUR BENEFIT, AND ONLY FIGHT TO WIN,” he wrote.

The United States was supposed to be in Syria for 30 days, that was many years ago. We stayed and got deeper and deeper into battle with no aim in sight. When I arrived in Washington, ISIS was running rampant in the area. We quickly defeated 100% of the ISIS Caliphate,….. — Donald J. Trump (@realDonaldTrump) October 7, 2019

….including capturing thousands of ISIS fighters, mostly from Europe. But Europe did not want them back, they said you keep them USA! I said “NO, we did you a great favor and now you want us to hold them in U.S. prisons at tremendous cost. They are yours for trials.” They….. — Donald J. Trump (@realDonaldTrump) October 7, 2019

…..again said “NO,” thinking, as usual, that the U.S. is always the “sucker,” on NATO, on Trade, on everything. The Kurds fought with us, but were paid massive amounts of money and equipment to do so. They have been fighting Turkey for decades. I held off this fight for…. — Donald J. Trump (@realDonaldTrump) October 7, 2019

….almost 3 years, but it is time for us to get out of these ridiculous Endless Wars, many of them tribal, and bring our soldiers home. WE WILL FIGHT WHERE IT IS TO OUR BENEFIT, AND ONLY FIGHT TO WIN. Turkey, Europe, Syria, Iran, Iraq, Russia and the Kurds will now have to….. — Donald J. Trump (@realDonaldTrump) October 7, 2019