TURKEY’S LATEST political crisis is one to which the overused adjective byzantine could fairly be applied. Prosecutors have brought graft charges against the sons of three cabinet ministers, the head of a state bank, a big developer and other figures close to the government of Prime Minister Recep Tayyip Erdogan. Mr. Erdogan has responded by firing the prosecutor heading up the case and scores of police officers and by alleging that he is the target of a foreign plot; pro-government media flatly blame Israel and the United States.

Behind the official announcements swirls an intricate and largely opaque power struggle between Mr. Erdogan’s Islamist political party and a formerly allied Islamist movement headed by a reclusive scholar, improbably based in Pennsylvania. Followers of Fethullah Gulen have long been reported to occupy key posts in the judiciary and police, from which they helped Mr. Erdogan break the power of Turkey’s once-overweening military. Now they appear to be targeting some of Mr. Erdogan’s closest associates.

The origins of the power struggle are the subject of endless speculation. Some say Mr. Gulen objected to Mr. Erdogan’s feuding with Israel and strong support for Syrian rebels. But for the United States and other Western governments, what matters is that Mr. Erdogan — once regarded as a model Islamist leader and treated as a close ally by President Obama — is responding to a political challenge with autocratic tactics and anti-Western diatribes. If those methods succeed, Turkey’s ­already-fragile democratic institutions will be further undermined.

Mr. Erdogan is a popular leader who has won three national elections, but in recent years he has become increasingly intolerant of critics, whether in the media or civil society. Last summer he sent riot police to attack protesters opposing the redevelopment of Istanbul’s Gezi Park, triggering still larger protests. Then, too, he claimed that the demonstrations were orchestrated from abroad. Now the prime minister is attempting to shut down corruption investigations by firing those conducting them; meanwhile, pro-government media have been campaigning against the U.S. ambassador, Francis J. Ricciardone, ludicrously claiming that he is somehow orchestrating the probes.

In fact, though most of the evidence has not been publicly released, prosecutors do not appear to have brought spurious cases. The three ministers whose sons were arrested on graft charges all resigned, and one called for the resignation of Mr. Erdogan. The bank whose director was arrested has long been suspected of helping Iran evade financial sanctions.

In the end, however, voters rather than courts may determine the outcome of the crisis. Mr. Erdogan has begun stumping for local elections in March, seeking political vindication. If his party wins, he probably will press ahead with plans to increase the powers of the presidency before running for the job later this year. He makes no secret of his plans to remain in power until 2023, when Turkey will celebrate 100 years as a republic.

Neither Turkey nor the West would benefit from such a consolidation of power. The Obama administration and the European Union should be pressing Mr. Erdogan to respect the rule of law and give police and prosecutors the opportunity to present their cases in court.