The Obama White House seems blithely unaware that one of America’s most important partners in the struggle to defeat the Islamic State (ISIS) and alleviate the refugee crisis in Europe—Turkey, a member of NATO—is on the brink of a political meltdown that could end its experiment in liberal democracy.

The massive suicide bombing in Ankara last month that killed 97 people and injured hundreds more—the worst terrorist attack in modern Turkish history—revealed a bitterly divided society. Though ISIS was immediately suspected in the attack, opposition leaders blamed the government of Prime Minister Ahmet Davutoglu and his Islamist Justice and Development Party (AKP). The prime minister, lambasting his opponents, was criticized for offering muted sympathy for the victims of the assault.

The results of the Nov. 1 snap parliamentary elections—held because the AKP failed to form a coalition government following national elections in June—are unlikely to reverse the downward spiral. Although the AKP has recaptured its majority in parliament, gaining 49 percent of the vote, its governing style has alienated huge segments of the population.

Turkey analysts should not have been surprised by the rancor and recriminations in the wake of what is being called “Turkey’s 9/11.” Thirteen years of political dominance by the AKP have brought with it the demonization of political opponents, an erosion in the rule of law, a crackdown on media criticism, and an increasingly Islamist vision imposed upon Turkey’s secular democracy.

When I was in Istanbul for the June 7 elections, I learned of widespread fears that the AKP’s president, Recep Tayyip Erdogan, intended to use his parliamentary majority to convert Turkey into a Putin-style autocracy. Bolstered by the November elections, Erdogan is pledging to amend the constitution to shift the parliament’s executive powers to his office. Whether or not he succeeds, the AKP’s Islamist agenda already has poisoned the political climate and further divided a nation already struggling with its cultural identity.

“This is the most fatal terror attack on Turkey in its history,” Ziya Miral, a Turkish academic living in London, told the New York Times. “And the fact that we cannot come together as a country at the moment and mourn for the loss of our citizens is deeply saddening.”

That feeling was echoed by other Turkey observers, including Burak Kadercan of the United States Naval War College. “As spectators of Turkish politics, we are currently watching an end-to-end pileup in slow motion.” Soner Cagaptay, an analyst at the Washington Institute for Near East Policy, published a book last year called The Rise of Turkey: The Twenty-First Century’s First Muslim Power, extolling Turkey’s political and economic accomplishments over the last decade. Now Cagaptay worries that the country is “about to come apart at the seams.”

The question now is whether anyone in the Obama Administration is paying attention to Turkey’s potential descent into chaos.

President Obama offered his “deepest personal sympathies” after the Ankara attack and expressed “solidarity” with Turkey in the fight against terrorism. Yet surely much more is required: under Article Five of the North Atlantic Treaty, a terrorist attack against a fellow NATO member is considered an attack on all members. It triggers active military cooperation against a common enemy.

Mr. Obama, for all of his braggadocio about leading a “fifty-three member coalition” against ISIS, has done nothing to set the stage for such cooperation. He has failed to offer a realistic military strategy to defeat ISIS. And thus he has failed to persuade Turkey—the most important potential military partner in the region—to meaningfully engage in the war on radical Islam. (Turkey’s belated decision over the summer to authorize air strikes against targets in Syria remains deeply unpopular.)

Meanwhile, the refugee crisis in Syria and Iraq is putting new strains on Turkish society. Turkey has taken in more than two million Syrian refugees—virtually none of whom speak Turkish—in addition to hundreds of thousands of Iraqis and Afghanis. Without Turkey acting as a safety valve, the European refugee problem would become an unimaginable crisis. Nevertheless, Turkey’s finance minister recently derided an aid package from the European Union as “unacceptable.” The Obama administration has repeatedly rejected Ankara’s plea to create a “no-fly zone” in northern Syria, which would resettle some refugees and take pressure off of Turkey.

Mr. Obama’s self-styled commitment to “multilateralism” hasn’t kept him from alienating or ignoring much-needed allies. If Turkey squanders its achievement as a stable, Muslim-majority democracy, virtually every problem facing the United States in the Middle East will become exponentially more difficult to solve.