It’s not unusual for political leaders in trouble to use diversionary tactics to turn their fortunes around. Hollywood capitalized on this theme in a popular 1997 film called “Wag the Dog” in which, right before an election, a political spin doctor distracts voters from a presidential sex scandal by engaging a film producer to create a fake war with Albania.

There are suspicions that a real-time, dangerous version of that scenario is playing out in Turkey, where President Recep Tayyip Erdogan is in a desperate struggle to stay in power after his Islamist-rooted Justice and Development Party lost its governing majority in a crucial election in June. Ahead of new elections set for Nov. 1, Mr. Erdogan last month reignited a war with Kurdish separatists, the Kurdistan Workers’ Party or P.K.K., in an apparent effort to rally support for the government and thus salvage his ambitions for continued authoritarian rule and greatly expanded powers.

In recent years, Mr. Erdogan made strides toward recognizing the rights of Turkey’s Kurdish minority and moving toward a fragile peace with the separatists, who had waged a three-decade war against the Turkish government. About 40,000 people were killed, most by security forces. All that diplomacy seems like ancient history, now that Turkish warplanes have resumed strafing targets in northern Iraq where the separatists are based. The pretext for the renewed fighting was the killing of two Turkish police officers. But even if the gunmen were P.K.K., as the government claims, Mr. Erdogan could have found other ways to respond than all-out war.

Mr. Erdogan had long counted on the Kurds to help him achieve the parliamentary supermajority in the June elections that would have allowed him to change the Constitution and create a more powerful presidency. The Kurds make up 18 percent of the population. And while marginalized for years, they had voted for his party in the past. But in June, many of the Kurds, joined by secular Turks, switched loyalties to the pro-Kurdish People’s Democratic Party. Despite strenuous efforts during the campaign by Mr. Erdogan to discredit it, that party won enough votes to help deprive Mr. Erdogan’s party of a governing majority.

Ahmet Davutoglu, Turkey's prime minister, met with his party on Friday to discuss the formation of an interim government.

Umit Bektas / Reuters

By renewing military action, Mr. Erdogan appears to be making an aggressive appeal to Turkish nationalists opposed to self-determination for the Kurds. He is worried about the growing strength of the separatists, whose military affiliate in Syria has become a close and effective ally of the United States in the fight against the Islamic State. More broadly, Mr. Erdogan is fearful that the Kurds, an ethnic group with populations throughout the region in Iran, Iraq, Syria and Turkey, will push even harder to establish the sovereign state they have long yearned for. They have been emboldened by their Syrian affiliates’ gains against ISIS and the creation of a relatively stable Kurdish province in Iraq.

Mr. Erdogan last month agreed to let the Americans use Incirlik air base and two other bases to fly missions against ISIS, a long overdue commitment that should have been pro forma for a NATO ally but took a year of tough negotiations because of Turkish resistance. He also agreed to join the American-led coalition in the fight against ISIS.

But it is clear that his main priority is fighting the Kurdish separatists. The United States should use its influence in the region to stop the fighting and deprive Mr. Erdogan of an excuse to continue a military operation that makes the difficult struggle against the Islamic State even harder.