As President Barack Obama departed office, he assured us he was leaving behind a much safer world. He lied.

For eight years, he embraced a do-nothing foreign policy of appeasement, only emboldening our enemies to increase the threat to our national security.

So far, Donald Trump has devoted his presidency to challenging these threats. While it has generated saber-rattling from countries like North Korea, Iran, and Russia, the testing of Trump’s commitment to a pro-American faction — the Iraqi Kurds — in the Middle East has just moved front and center, firmly placing the U.S. in a dilemma.

On September 27th, the results were announced of a referendum held by Iraqi Kurds on declaring independence from Iraq. An overwhelming majority—92 percent of three million Kurds—voted in favor of independence. Not only did Baghdad look unfavorably upon the resolution vote, but so too did two other nations with significant Kurdish minorities: Iran and Turkey. Both fear a push for Kurdish independence in Iraq will trigger a similar separatist push in their countries. Kurds in Iraq comprise 15-20 precent of the population; 19 percent in Turkey and 11 percent in Iran.

Just prior to the vote, the U.S. unsuccessfully pressured the Kurdistan Regional Government to cancel the referendum. The U.S. objected on the basis that it “is distracting from efforts to defeat (the Islamic State) and stabilize the liberated areas.”

A U.S.-Kurdish relationship first developed in the aftermath of World War I with the defeat of the Ottoman Empire. A 1920 treaty breaking up that Empire initially allowed for a small Kurdish homeland. But, by virtue of a subsequent treaty three years later re-drawing Turkey’s borders, that homeland ceased to exist.

Since then, the U.S.-Kurdish relationship has been a bit of a rollercoaster ride. In 1990, as Iraqi dictator Saddam Hussein’s repression of the Kurds increased, the U.S. imposed a no-fly zone over Iraqi Kurdistan to protect them.

When the subsequent 100-hour Persian Gulf war, pitting a U.S.-led coalition of forces against Saddam Hussein, ended in February 1991, President George H. W. Bush encouraged the Kurds to rise up against the dictator. Perhaps believing the U.S. would assist, the Kurds ended up paying a heavy price in trying, and failing, to do so as we left them to go it alone.

Despite our betraying the Kurds in 1991, when U.S. forces invaded Iraq in 2003 and Turkey refused to grant us access to do so, the Kurds came to our assistance to help us—this time successfully—eject Saddam from power.

As ISIS began establishing a footprint in the Middle East, the Kurds proved more successful than other fighting forces in containing their advance. Kurds in Syria quickly became our best ally in fighting ISIS. In 2014, they began relying upon U.S.-air strikes to do so. In 2016, U.S. commandos accompanied Kurdish forces on counter-ISIS operations.

Despite recognizing Kurdistan could provide the U.S. with a second “mighty aircraft carrier” of a land-based nature in the Middle East — the first being Israel — and our earlier pledge to support the Kurds with weapons and ammunition, their independence resolution placed the U.S. in a difficult situation. It is one, undoubtedly, evolving at Tehran’s initiative to test whether Trump’s bravado holds more bark or more bite.

There should be little doubt at this point that most of what Iraq’s leadership does, or does not do, is the result of Iranian mullah influence. Both countries are majority Shiite Muslim and, therefore, share a mutual interest in working together.

Following the Kurdish referendum, Baghdad gave the Kurds an October 15th deadline to retreat to positions both parties agreed to retain in a 2014 accord. When the Kurds failed to do so, U.S.-equipped Iraqi forces wasted no time advancing on several areas near Kirkuk before entering the city itself. Iraqis were assisted in the effort by Iranian-backed Shiite militias. The latter included Hashd al-Shabi—an umbrella organization for 40 predominantly Shia Iraqi paramilitary forces initially established with Iran’s help to fight ISIS.

Unsurprisingly, just prior to Iraqi forces kicking off their advance, Major General Qasem Soleimani — commander of foreign operations for Iran’s elite Islamic Revolutionary Guard Corps (recently designated a Foreign Terrorist Organization [FTO] by the U.S. Treasury, if not the State Department) —reportedly arrived in Kurdistan.

Whereas President Bush enticed the Kurds to take action against Saddam in 1991 and then abandoned them, this time no such enticement was given by Washington. As previously mentioned, Trump even tried to stop the Kurdish referendum.

Undoubtedly, Tehran sees this as an opportunity to nip a Kurdish separatist movement in the bud in Iraq to serve as an example to the Kurds in Iran, as well.

We know all too well the brutality of which a joint Iraq-Iran military force is capable. We saw it demonstrated several times inside Iraq after the U.S. withdrew and relinquished authority to the democratically elected Iraqi government. In collusion with Iran, Iraq attacked unarmed members of an Iranian opposition group — the People’s Mojahedin Organization of Iran (PMOI) —caught up in a state of international limbo while residing at a camp from which they could not leave. Before the group could be relocated outside Iraq, dozens were killed in the joint forces’ onslaught.

While the U.S., as the invading force in Iraq that initially captured the PMOI camp, created a legal responsibility for itself to keep those residents safe, it repeatedly failed to do so under Obama’s leadership.

There is no legal responsibility on the part of the U.S. to help Kurds targeted by the Shiite duo of Iraq and Iran. And, should we not act, based on Trump’s timely effort to stop the referendum, there should be no sense of betrayal by the Kurds as no expectation of U.S. help was ever forthcoming.

However, an ethical responsibility to assist the Kurds will arise should the joint Iraq-Iran force’s advance turn bloody. The historical track record of these two states, particularly when acting in unison as a force of one, suggests that will happen.

The chess match between Washington and Tehran has already begun. Trump’s initial response to Iraq-Iran’s advance against the Kurds has been a threat to end the massive U.S. train-and-equip program for Baghdad. The weeks ahead will determine if counter-moves advance for Washington from the “bark” to the “bite” level.

Lt. Colonel James G. Zumwalt, USMC (Ret.), is a retired Marine infantry officer who served in the Vietnam war, the U.S. invasion of Panama and the first Gulf war. He is the author of “Bare Feet, Iron Will–Stories from the Other Side of Vietnam’s Battlefields,” “Living the Juche Lie: North Korea’s Kim Dynasty” and “Doomsday: Iran–The Clock is Ticking.” He frequently writes on foreign policy and defense issues.