The chiefs of staff of Turkey’s military stepped down Friday as tensions dramatically increased over the arrest of dozens of officers accused of plotting to overthrow the Islamic-rooted government.

The unprecedented resignation of so many top commanders in Turkey signals a deep rift with the government, which has been confident in confronting a military that once held sway over Turkish political life. The arrests of high-ranking military officers would once have been unimaginable.

The resignations of Turkey’s top general, Isik Kosaner, along with the country’s navy, army and air force commanders, came hours after a court charged 22 suspects, including several generals and officers, with carrying out an Internet campaign to undermine the government. The commanders asked to be retired, the state-run Anatolia news agency said.

Prime Minister Recep Tayyip Erdogan met with Gen. Necdet Ozel, the commander of the gendarme forces — the highest-ranking commander to remain in office. Ozel had been widely expected to become the next head of the military, and Kosaner’s resignation might speed up the process.

In the first reaction by the government, Transportation Minister Binali Yildirim said that “the state would continue to function.”

“The information I received is that they have asked for their retirement,” Yildirim said.

The commanders who stepped down decided not to attend a scheduled reception hosted by the embassy of the breakaway Turkish Cypriot state in a possible move to avoid civilian leaders, NTV television said.

Kosaner had met with Erdogan and President Abdullah Gul earlier Friday to discuss several key appointments during next week’s high military council meeting.

Seventeen generals and admirals, who are in line for promotion, have been jailed along with nearly 200 officers on charges of plotting to overthrow the government in 2003 in a case dubbed “Sledgehammer.”

More than 400 people — including academics, journalists, politicians and soldiers — also are on trial on separate charges of plotting to bring down the government. That case is based on a conspiracy by an alleged gang of secular nationalists called Ergenekon.

The government hails coup plot trials as a break with impunity. But sweeping roundups of suspects and long confinements without a verdict have raised concern about judicial fairness.

The government denies that the cases are politically motivated and says it has simply been working to improve democracy.

— Associated Press