After a decade of dominance over Turkey’s political scene, Prime Minister Recep Tayyip Erdogan appears to have been thrown off balance by a rapidly expanding corruption scandal that has brought down members of his cabinet and strained ties to the United States.

Forced to fire three of his ministers — one of whom immediately implicated the prime minister in the scandal — and struggling to contain the scope of the investigation, Erdogan seems unlikely to come out of the crisis unscathed.

But many observers say it’s too early to write off the savvy politician who has weathered a series of crises since his Islamic-based party came to power in 2002.

“If the allegations are true, this would without doubt be the deepest crisis the government has faced,” said Murat Yetkin, editor in chief and political commentator for the Hurriyet Daily News newspaper.

Meanwhile, in a new sign of a profound power struggle within Turkey’s judiciary and police forces, an Istanbul prosecutor who had been overseeing the corruption investigation of Erdogan’s inner circle was removed from the case Thursday.

In leaving his position under pressure, the prosecutor, Muammer Akkas, issued a condemnation of Erdogan’s government, accusing it of interfering in the judiciary and preventing him from carrying out his work.

Akkas said that the government had prevented the police forces from pursuing a new round of suspects — including Erdogan’s son, whose name was on a summons to appear as a suspect that was leaked to the media Thursday evening — in the widening inquiry.

“The judiciary has clearly been pressured,” he said in the written statement, charging his superiors with “committing a crime” for not carrying out arrest warrants, and saying that suspects had been allowed to “take precautions, flee and tamper with evidence.”

Erdogan, 59, was long hailed as a transformational leader who came to power on a promise to crack down on corruption and carried out spectacular economic and political reforms. He turned Turkey into a relatively stable and prosperous country, curtailing the powers of the military and raising the nation’s international profile.

More recently, though, critics say he has cut a more authoritarian and erratic figure, often reverting to conspiracy theories to deal with crises. Those tactics have damaged his image as an international statesman.

The scandal erupted on Dec. 17, when police launched a probe targeted at Erdogan’s allies, focusing on alleged illicit money transfers to Iran and bribery for construction projects. Dozens were detained in police raids, including the sons of three key government ministers. Two of the sons were later arrested on bribery charges.

Erdogan resisted calls for the dismissal of the three ministers for a week but finally gave in on Wednesday, forcing them to step down and then distancing himself from them.

The move backfired when one of them, Environment and Urban Planning Minister Erdogan Bayraktar, refused to go quietly and mounted an unprecedented attack on Erdogan, calling on him to step down too. Bayraktar said construction projects under investigation were launched at the prime minister’s instructions.

The crisis has upset the markets, and the Turkish lira plummeted to a record low on Thursday against the dollar.

“It is a pity that a leader who in his first two terms as prime minister served the country so well has since the last general election turned increasingly arbitrary and authoritarian,” said Professor Sahin Alpay of Istanbul’s Bahcesehir University. Erdogan “more and more is looking like a train without brakes, like a loose cannon.”