The ongoing conflict has dominated Pakistan's political scene this year, stoking instability at a time when many say the country's leaders should be more focused on issues like the energy crisis and the Taliban insurgency.
The court wants Prime Minister Raja Pervaiz Ashraf to write a letter to Swiss authorities asking them to reopen a graft case against President Asif Ali Zardari dating back to the late 1990s. The government maintains that Zardari has immunity from prosecution while in office and so far has resisted writing the letter.
The previous prime minister, Yousuf Raza Gilani, lost his job in June in a similar showdown with the court after refusing to write the letter.
The head of a five-judge panel, Asif Saeed Khosa, said Wednesday that Ashraf must appear before the court on Aug. 27. The judge said it was unfortunate that the prime minister had failed to comply with the court order already.
If Ashraf fails to appear in court or continues to refuse to write the letter, he could be charged with contempt of court, the judge added.
A prominent Pakistani lawyer Abdul Hafeez Pirzada said he didn't expect Ashraf to write the letter to the Swiss, which could result in him being disqualified from office.
"I don't think they (the government) are in a mood to write the letter," Pirzada said.
An adviser to the prime minister, Fawad Chaudhry, said Ashraf had been informed about Wednesday's ruling and would consult with his political allies before making any decision. Chaudhry said the ruling could further deepen political instability at a time when the country is facing multiple challenges.
However, Zardari is not in immediate danger of being put on trial. The Swiss have indicated they have no plans to reopen the case while Zardari is in office because he enjoys immunity as head of state.
The court has been aggressive in using its clout to investigate the government as well as Pakistan's security agencies, and appears to consider it unacceptable for the government to ignore its orders.
The ruling Pakistan People's Party views the court with suspicion, and supporters have questioned whether the court is becoming too powerful.
The high court convicted Ashraf's predecessor Gilani of contempt in April and ousted him from office two months later. The PPP rallied support to elect a new premier and has continued to reject the court's decision.
The PPP also tried to outmaneuver the high court by passing a law designed to protect the prime minister from being charged with contempt of court. But the Supreme Court last week struck down that legislation.
The court could keep dismissing prime ministers over the issue, undermining the government and forcing an early national election.
Meanwhile, two guards who were transporting six militant prisoners in a vehicle were killed when the detainees overpowered them, grabbed their weapons and opened fire, Pakistani officials said Wednesday.
The incident happened Tuesday in the frontier city of Peshawar, a security official said. Three of the militants were later killed in a shootout with police, while the others escaped, a police official said.
In a statement, the Taliban claimed their fighters killed five security personnel, but the insurgents often inflate the casualty toll to bolster their positions.
The Pakistani officials all spoke on condition of anonymity because they were not authorized to speak to the media.