What should Washington do now? That’s the urgent question following President Trump’s unforced error of green-lighting Turkey’s invasion of northern Syria. The decision dealt a severe blow to US interests and credibility. Trump must reverse course.

A return to the way things were two weeks ago is no longer possible. With Turkish, Russian and Syrian forces operating in formerly US-patrolled territory, reinserting American troops would likely mean confrontation with these forces.

The White House must find new ways of salvaging four vital national interests at stake: preventing the resurgence of ISIS; checking Turkey in the region; rolling back Iran, which has notched another victory in this Syria fiasco; and bolstering close regional allies threatened by ­recent events.

Fact is, targeted, measured military action is the most effective way to change behavior in the Middle East at the moment. But it also helps build US credibility, so that, in the future, US demands will carry greater weight.

With that in mind, the United States must, first, do whatever is necessary to keep ISIS fighters in northern Syria in jail and kill those who escape. With Syrian Kurdish forces distracted defending against Turkey, ISIS can return to life. It will fall to US forces in Iraq to do much of this work. European allies should contribute.

Second, the United States must use diplomacy and coercion to end Turkey’s invasion. US forces should be allowed to engage Turkish proxies, many of them Islamist extremists, who fire in proximity to US ­positions or threaten civilians. The United States should begin removing its troops and assets from Turkish bases, such as the one at Incirlik, and redeploy some of them as well as additional aerial and naval assets to Greece, Turkey’s rival.

That will focus minds in Ankara and lessen Ankara’s leverage over Washington, while providing credible deterrence against further Turkish aggression in the eastern Mediterranean. It would also signal US resolve to downgrade the relationship with Ankara while bolstering our ties with Athens — an ally eager to become a more ­active US partner.

Third, and long overdue, the United States must respond to months of Iranian aggression in the region, including against Saudi Arabia last month. Now, significant retaliation is necessary not only to deter further aggression but to help restore US credibility globally by demonstrating that Trump doesn’t shy away from confrontation when necessary.

This should include expanding the US presence at al-Tanf, a critical border crossing between Iraq and Syria. Forces there should be allowed to engage Iranian-backed militias on either side of the border that are stalking the area, transporting materiel or attempting to control local tribes.

Fourth: Protect the remaining Syrian Kurdish area and bolster Israel’s security, both of whose positions are now more perilous. Already, the Jewish state faces 130,000 Hezbollah missiles in Lebanon, Iranian ­attempts to gain new footholds in Syria and continued expansion of Iran’s nuclear program. Now, the Kurds have been forced to ally with Assad, strengthening Iran, which will further benefit from any US evacuation of Syria.

Right now, Israel is alone in ­effectively striking Iran and contesting its regional expansion. But that also means America and its regional allies need Israel even more, as the Jewish state’s concerted and persistent attacks against Iranian assets help advance US and allies’ interests in addition to Israel’s.

Thus, the United States should augment Israel’s military capacity to confront Iran by accelerating delivery of needed weapons, elevating Israel’s status for sharing military technology and intelligence and boosting joint R&D.

Further, a US-Israel mutual defense treaty could enhance deterrence and mitigate the intensity of a conflict, demonstrating America isn’t retreating from the region.

Wednesday’s 354-60 vote in the House of Representatives in ­favor of a resolution rebuking Trump’s abrupt Syrian withdrawal showed it can entail serious political costs. He can’t undo it, but he needs to mitigate the consequences and salvage what he can of US interests, as well as his own and America’s credibility.

Michael Makovsky, a former Pentagon official, is president and CEO of the Jewish Institute for National Security of America.