The news of mass resignations by Turkey's military leadership is a sign that NATO's second-largest force is snapping under the weight of the ruling party.

Today's news of the mass resignation of Turkey's Chief of Staff, General Isik Kosaner, and the force commanders is a sign that the Turkish military, the second largest force in NATO, is snapping under the weight of the ruling Justice and Development Party (AKP).

Since the AKP came to power in Ankara in 2002, civilian-military relations between the governing party, a coalition of conservatives, reformed Islamists and Islamists, and the military, a bastion of secularism, have been tense. But thus far, the military leadership has remained diplomatic, choosing not to confront the government. Yet, with so many top commanders of the Turkish military resigning at once today, this is no longer the case.

This had been coming: The military and the AKP never saw eye to eye on many issues, the most important of which was the firewall between religion, piety, and politics. So far, the AKP has enjoyed the upper hand: In 2007, the AKP authorities launched a court case, known as Ergenekon, which alleged a coup plot against the government and accused the military of involvement.

Four years and hundreds of arrests later, the case has yet to reach a verdict. Yet, the Turkish military has born the brunt of these arrests. Around half of all Turkish naval admirals have been jailed. Moreover, because all of the air force's four-star generals have been implicated, it was not certain that Turkey's military promotions board would even have a four-star general to promote to Chief of Air Force during its annual meeting in August. Consequently, the ironic joke in Ankara has become, "Thank God Greece is in an economic meltdown, otherwise, this would be the perfect time to invade Turkey!"

And now the military has snapped. The straw that broke the camel's back came earlier this week, when pro-AKP media suggested that 14 active duty generals and admirals who had been arrested in relationship to the Ergenekon case, though not yet indicted, would not only be bypassed in their promotions, but also forced to resign. Furthermore, only yesterday, the police arrested 22 additional top brass officers, blocking their likely promotion.

For the first time in its life, the Turkish military is like a deer in headlights, facing the political high beams of the Ergenekon case.

Historically the most-respected institution in the country and the kingmaker in Ankara, the military has seen its prestige and power free-fall since the AKP took power in 2002. Coup allegations, including assertions that the military was planning to bomb Istanbul's historic mosques to precipitate a political crisis, have hurt the Turkish army's standing. The military's status as the most trusted institution in the country is plummeting: in 2002, around 90 percent of the Turks said they trusted their military, while now most polls show that barely 60 percent say they do.

What is more, with dozens of generals and hundreds of other officers in jail for years with coup allegations, with no indictment in sight, the officer corps is demoralized. This is the Turkish military leadership's way of telling the government: "We are done playing with you. Set up your own team -- if you can."

The dilemma for the AKP is that this may not be possible. Turkish military officers all undergo the same training, with the same discipline and commitment to secularism and the subsequent opposition to the AKP. It will be difficult for the AKP to find pro-AKP officials in the military's top ranks.

This leaves Turkey with two options: Operate with a headless military, a risk in a country flanked by Iran, Iraq and Syria, the last of which is undergoing revolutionary turmoil right on the other side of a 500 mile-long border; or fashion an agreement between the AKP and the military to turn the high beams of the Ergenekon case off.

Turkey's moment of reckoning, delayed since 2002, seems to have arrived.

Soner Cagaptay is director of the Turkish Research Program at The Washington Institute.