Aamir Qureshi / AFP / Getty Images Pakistani Prime Minister Yousuf Raza Gilani waves as he leaves the Supreme Court in Islamabad on Jan. 19, 2012

Of late, Pakistani politicians could best be described as roulette players, betting the bank on singular gambits designed to win big political concessions, or at least the momentary attention of a rabid electronic media. But on Thursday, Prime Minister Yousuf Raza Gilani abandoned his defiant tactics for the more muted game of poker, gambling for time, rather than the big win.

Gilani had been called before the Supreme Court — only the second Premier in Pakistan’s history to be thus summoned — to answer charges that he was in contempt of court by refusing to reopen a decade-old corruption case against his boss, President Asif Ali Zardari. For the past three years, Gilani, Zardari and the ruling Pakistan People’s Party (PPP) had argued that sitting Presidents enjoy immunity from prosecution, according to the country’s constitution. The Supreme Court argued that it alone should be able to make that decision and, when Gilani refused to acquiesce, threatened him with contempt of court. Such a ruling would see him disqualified for office, precipitating the dissolution of Parliament and a call for new elections, potentially destabilizing a vital ally just as the U.S. attempts to embark on peace negotiations with the Taliban in neighboring Afghanistan.

Gilani, who only the week before had declared that the contempt-of-court charges were a thinly disguised political move to oust his party from power, saying his nation had to make a choice between democracy and dictatorship, appeared to have mellowed by the time he arrived in court on Thursday morning. He showed up with little fanfare, telling the seven-judge panel that he had not intended to defy the court but genuinely believed that Zardari, as President, enjoys immunity from all forms of prosecution. “I have come today to show my respect to this court,” he said in front of a packed courtroom. “There is complete immunity for heads of state everywhere … It will not give a good message to proceed against a President who is elected by a two-thirds majority [of parliamentarians],” thus throwing the President to the “wolves.”

The court, mollified by Gilani’s conciliatory move, granted his lawyer another two weeks to prepare the case, hence granting the PPP, and the country, a welcome pause from the escalating tensions. The court could proceed with the charges, but Gilani’s lawyer, Aitzaz Ahsan, also suggested that he would be willing to discuss the immunity issue, thus satisfying the court’s initial demand. Such proceedings could take months, taking place long after Senate elections in March that are likely to ensure PPP dominance in government for years to come (Senators are selected by members of the provincial assemblies).

If the current government can stay in power through the spring, it would be a milestone for democracy in Pakistan. Not once in the country’s 65-year history has a Parliament sat through a full term. The Pakistan Muslim League-N party, headed by former Prime Minister Nawaz Sharif, could have easily capitalized on growing dissatisfaction with the PPP to gain ground in early elections, says deputy secretary-general Ahsan Iqbal, but the long-term repercussions would have been grave. “Sure, we could have gone in for the kill, and pushed for early elections, but it would have further cemented the precedent that no government in Pakistan would be able to fulfill its term.” The military establishment would take advantage of the chaos, he added, perpetuating Pakistan’s propensity for military coups and continuous instability. “We don’t want the democratic institutions to be undermined in anyway.”

To be sure, the sudden magnanimity of the PPP’s principal rivals has many in the party suspicious, but outside observers hope it is a reflection of a certain maturity in the democratic process. The fact that the Supreme Court has brought the executive to heel is another encouraging sign that Pakistan is building better foundations for the long term. Still, problems await. The government may be able to breathe a sigh of relief over the reprieve, says former national-security adviser Mahmud Durrani, “but the overall situation is still not good. Pakistan is facing a crisis of governance, of economy, of law and order and of terrorism. And those problems will not vanish because the government and the Supreme Court have stepped back from the brink.”

Baker is TIME‘s Middle East bureau chief, based in Beirut. Find her on Twitter at @arynebaker. You can also continue the discussion on TIME‘s Facebook page and on Twitter at @TIMEWorld.