Islamabad, Pakistan (CNN) -- The Pakistani Supreme Court on Monday indicted Prime Minister Yousuf Raza Gilani for contempt after his steadfast refusal to revive old corruption cases against the country's president.
The court's move deepens the political turmoil in Pakistan amid tensions between the civilian and military authorities and fraught relations with the United States. It means Gilani, the first Pakistani prime minister to be charged while in office, will face a trial that could endanger his political future.
Gilani has "willfully flouted, disregarded and disobeyed the direction given by this court," said Justice Nasir ul-Mulk as he read out the charge, to which Gilani pleaded not guilty.
The court has demanded that Gilani ask the Swiss authorities to reopen corruption charges from the 1990s against President Asif Ali Zardari and others.
Gilani, whose government has resisted the request, has been locked in a standoff with the Supreme Court justices for about two years over the issue. He could be jailed for six months if the justices find him in contempt.
Observers say the prospects for Gilani are looking increasingly bleak.
"I think this is the end for the prime minister as he has decided to confront the court," said Rasool Bux Rais, a political analyst based in Lahore.
Gilani and his lawyers have argued that the prime minister has not followed the court's order because Zardari enjoys immunity in Pakistan and abroad as a president in office.
The court has asked the prosecution and the defense to file their evidence before the end of the month, said Gohar Ali, a member of the prime minister's legal team.
The justices have appointed the attorney general, Maulvi Anwar ul-Haq, to head the prosecution. Tensions with the government over this case have contributed to the departures of previous attorneys general.
Gilani said in an interview over the weekend with the satellite news network Al Jazeera that he had an "extremely capable" lawyer and didn't believe the court would jail him on the contempt charges.
Even if he is convicted, there is still one way for him to potentially avoid prison and political ruin.
"He still has the presidential pardon as a last shield," said Imtiaz Gul, an author and Islamabad-based political analyst, noting that Zardari is allowed under the Constitution to grant pardons.
Gul said that although the court's pursuit of this case has been controversial, it is motivated by good reasons.
"The Supreme Court is pressing ahead with its agenda, which is creating as much respect for the rule of law as possible," he said. "And it's driving home the message that all are equal under the law."
Gilani served more than five years in prison between 2001 and 2006 on corruption charges brought by the previous military regime of Gen. Pervez Musharraf -- counts he said were also politically motivated.
The corruption cases that the Supreme Court now wants reopened stem from money-laundering charges against Zardari and his late wife, former Prime Minister Benazir Bhutto. A Swiss court convicted them in absentia in 2003 of laundering millions of dollars.
After Musharraf granted a controversial amnesty in 2007 to Zardari, Bhutto, and thousands of other politicians and bureaucrats, Pakistan asked the Swiss authorities to drop the case. In 2009, the Pakistani Supreme Court ruled the amnesty was unconstitutional and called on the government to take steps to have the cases reopened.
The government has not done so, and the court apparently lost patience. Since Gilani is the head of the government, the court justices view him as responsible.
The heads of Gilani's political party's main coalition partners joined him in court on Monday in a show of solidarity.
CNN's Reza Sayah and Jethro Mullen contributed to this report