Yusuf Raza Gilani
Pakistan's Prime Minister Yusuf Raza Gilani waves after arriving at the Supreme Court in Islamabad. Reuters

Pakistan's prime minister Yousuf Raza Gilani has been convicted of contempt of court but spared a jail sentence in a judgment that comes as a big blow for the Pakistani government. Gilani was convicted for failing to reopen corruption cases against President Asif Ali Zardari.

"The verdict is not fair," Gilani said. His defence was based on Zardari having immunity from graft charges as head of state.

Analysts said that Gilani's sentence was symbolic only as a substantial jail term of at least six months and disqualification from office had been expected.

The ruling coalition will decide the next step for the prime minister. Federal minister Firdous Ashiq Awan was quoted as saying that a review petition would be filed before the court.

Gilani had earlier told the cabinet in Islamabad: "We are satisfied with the input given by our lawyers and we are also satisfied with the input given by the attorney general," according to BBC.

The judgment had been reserved by the seven-judge bench after a three-month trial.