Pakistan's cricketer-turned-politician Imran Khan, center, gestures during an address to his supporters in Lahore, Pakistan, Wednesday, Aug. 13, 2014. (AP Photo/K.M. Chaudary)

Pakistan's Independence Day is on Aug. 14, but this year the occasion is marked by national crisis, not unity. The country is braced for heated protests on Thursday against the government of Prime Minister Nawaz Sharif. Key opposition leaders have called for protests and a march on the capital Islamabad from Lahore, leading authorities to set up barricades of shipping containers on the main highway connecting the two cities. Islamabad is under virtual lockdown, with shops closed and thousands of police and security forces deployed.

In the state of Punjab, Sharif's traditional power base, some 1,000 opposition activists have already been arrested. Meanwhile, commentators are spying the long shadow of Pakistan's military in the unrest. The army, of course, has precedent for intervention: the last time being in 1999, when none other than Sharif was the prime minister. How did it come to this?

A hopeful moment turns sour

Last year, Pakistan achieved the first successful and democratic transfer of civilian power in its history, with the party of Sharif, who returned from exile in 2007, surging to victory after a boisterous campaign. Prime minister now for the third time, Sharif had a strong electoral mandate and a comfortable majority in national parliament. It seemed he was in pole position to sort out Pakistan's epic energy woes, lay the groundwork for its economic recovery and take on the larger struggle of strengthening its civilian institutions.

But the country's fractious politics did not conform to the new script. Sharif has irked the military with, among other things, his attempt to jail the man who unseated him in a coup -- Gen. Pervez Musharraf -- on charges of high treason. (The case is ongoing.) "As Sharif attempts to hold a general accountable, there is a backlash not just from the army but also the political segments that think of the military as the savior," says Raza Rumi, a prominent Pakistani journalist and senior fellow at the Jinnah Institute.

His efforts so far to stabilize an economy that was on the brink of default have been positive, writes Ahmed Humayun, a South Asia fellow at the Atlantic Council, but "have yet to significantly impact the daily lives of most Pakistanis." Electricity shortages remain a persistent fact of life, with many Pakistanis disappointed by the lack of progress made by Sharif, a politician celebrated for his business acumen.

All the while, Pakistan's militant insurgencies continued to rage and Sharif's political opponents sharpened their knives.

The unlikely duo

Canada-based preacher Tahir-ul-Qadri speaks with media outside his residence in Lahore on Aug. 13, 2014. (Arif Ali/AFP/Getty Images)

The two figures spearheading the Aug. 14 protests are, on paper, rather dissimilar. Imran Khan, the head of the Movement for Justice party (known by its acronym, PTI), is a former playboy and star cricketer who has turned into a firebrand politician. His party, buoyed by support from the urban middle class, emerged from obscurity to eventually win 35 seats in last year's election, but Khan believes he was cheated of victory by Sharif's party and is seeking an audit of the vote and early elections. Most independent observers acknowledge that there were irregularities during the election, but they affected many candidates and were not significant enough to have changed the final outcome.

The PTI plans a "freedom march" from Lahore to Islamabad on Thursday, despite warnings from Sharif's government against such a demonstration. Its party workers were preparing fitfully, as this tweet from one of Pakistan's leading dailies shows:

Separate from Khan, but equal in his opportunism, is Tahir ul Qadri, a moderate Muslim preacher with a home in Canada and a substantial following in Pakistan. Qadri's political demands are less clear than those of Khan, though the Economist brands both their present activities as part of a "a shameless power grab."

In January of last year, Qadri brought Islamabad to a standstill when his followers massed in anti-corruption protests. He now seeks a caretaker, technocratic government and a complete refashioning of Pakistan's political system. His "Revolution" march will merge with that of Khan's Movement for Justice.

There are real grievances, to be sure. Part of the problem, says Rumi, in an e-mail to WorldViews, is "the inability of political elites to develop rules of business, undertake wide ranging electoral and political reforms that would enhance the credibility of the democratic process." There is also a palpable disillusionment within some sections of Pakistani society with the country's civilian leadership. Says Rumi: "There's a growing discontent among a rapidly-urbanizing Pakistan where expectations are high and old style politics of dynasties, bureaucratic management are viewed with suspicion."

The specter haunting Pakistan

Such frustrations are hardly unique to Pakistan and were aired energetically this year during elections in neighboring India. But Pakistan does not have India's relative democratic stability.

Instead, many fear the military coming to the fore in the coming days, particularly if Sharif takes a hard-line approach to the growing dissent. Humayun, of the Atlantic Council, suggests one possible scenario where the top brass could reassert itself:

This will especially be the case if Sharif overreacts and law enforcement authorities exhibit excessive force against demonstrators, creating political fodder for Sharif's opponents. In such an instance, the army may put pressure on Sharif to hold elections early -- either later in 2014 or early in 2015. However, if Sharif does not oblige, then direct military intervention followed by the installation of a caretaker government is not out of the question.

Despite its checkered history of meddling in the country's politics, Pakistan's military is still a widely admired institution. In recent years, it appeared to have retreated somewhat into the barracks, despite the fact that it retains a controlling interest in foreign policy and the administration of the country's economy.

Given the complexities and challenges any entity would have in governing Pakistan, it's likely there's little appetite for a new coup. Michael Kugelman, a South Asia scholar at the Woodrow Wilson Center, sums it up:

I don't think Pakistan's military has any desire to be directly saddled with the unprecedented challenges the government faces now; it much prefers to influence matters from behind the scenes. In other words, the time isn't right for the military to take over.