ISLAMABAD, Pakistan — Pakistan’s combative top judge made his most audacious foray into judicial activism yet on Tuesday, firing Prime Minister Yousaf Raza Gilani, emptying the cabinet and forcing President Asif Ali Zardari to reset his fragile governing coalition.

Chief Justice Iftikhar Muhammad Chaudhry’s order was the culmination of a three-year transformation that has injected the once supine Supreme Court into the heart of Pakistan’s power equation. Yet in doing so, Justice Chaudhry has ventured deeply into the political fray, drawing accusations of partisan, even grudge-driven, prosecutions.

“This is a court that is determined to establish itself as a player to be respected and feared,” said Cyril Almeida, a political analyst with the newspaper Dawn. “First it was elbows out; now it’s come out swinging — and it’s knocked out the prime minister.”

The true target of Justice Chaudhry’s order, though, may have been President Zardari. The two men have been at odds since 2009, when Mr. Zardari opposed Justice Chaudhry’s reinstatement. They have engaged in proxy combat through the courts ever since; indeed, Mr. Gilani’s dismissal stemmed directly from his refusal to heed court orders to pursue a corruption inquiry against the president.