President Trump said Wednesday that the US “does not endorse” Turkey’s military attack against Kurdish fighters in Syria — adding that the White House “made it clear to Turkey that this operation is a bad idea.”

Noting that there are no US troops in the area, the president said in a statement that Ankara “has committed to protecting civilians, protecting religious minorities, including Christians, and ensuring no humanitarian crisis takes place — and we will hold them to this commitment.”

He continued: “Turkey is now responsible for ensuring all ISIS fighters being held captive remain in prison and that ISIS does not reconstitute in any way, shape, or form. We expect Turkey to abide by all of its commitments, and we continue to monitor the situation closely.”

Trump also reiterated that “from the first day I entered the political arena, I made it clear that I did not want to fight these endless, senseless wars — especially those that don’t benefit the United States.”

On Monday, the president unleashed a broadside at Turkey, threatening to “totally destroy and obliterate” its economy if Ankara took action that he considered “off limits” after he announced his decision to pull US forces from northeastern Syria.

Trump said he had told Turkish President Recep Tayyip Erdogan in a phone call that his country could suffer the “wrath of an extremely decimated economy” if it acted in Syria in a way that was not “humane.”

In Ankara, Erdogan told reporters he planned to visit Washington to meet with Trump on Nov. 13.