Pakistan's Supreme Court has found Prime Minister Yousuf Raza Gilani guilty in a contempt of court case. However, the court gave Mr Gilani only a symbolic sentence and he will not have to serve any time in jail.
Mr Gilani had denied that he had been in contempt for failing to reopen corruption cases against President Asif Ali Zardari.
Mr Gilani had argued that the president, who rejects the corruption charges, has immunity as head of state.
The three-month trial ended on Tuesday when defence and prosecution counsels concluded their arguments.
Arriving at the Supreme Court on Thursday morning, Mr Gilani and his fellow cabinet members were surrounded by media and his supporters, some of whom showered him with rose petals.
He left the building shortly after the verdict was announced.
The verdict may well be viewed as a victory by the government as it would appear that for the moment Mr Gilani can carry on in office, the BBC's Aleem Maqbool in Islamabad reports.
Mr Gilani, who was making his third appearance before the court this year, had previously said he would have to step down if he was found guilty.
The BBC's M Ilyas Khan in Islamabad says there is still a chance that Mr Gilani could be automatically disqualified from holding public office - it depends under what part of the constitution he has been convicted.
Our correspondent says the court has issued no such order and not initiated proceedings to that effect, so Mr Gilani is free to remain in his post for now.
The case is part of a stand-off between the government and the judiciary, which many believe is being backed by the military as it pursues the case against the civilian administration.
President Zardari is accused of using Swiss bank accounts to launder bribe money. He has long said the charges are politically motivated.
The Supreme Court has said Mr Gilani defied a court order to write to the Swiss authorities and ask them to reopen the cases against Mr Zardari.
The defence counsel's main argument was that the case in Switzerland had been closed by a Swiss judge "on merit" and there was no justification to apply for its revival.
The defence also argued Mr Zardari has international immunity against criminal proceedings for as long as he is president. Mr Gilani's team had argued that there was, therefore, no legal evidence to find the prime minister in contempt.
The prime minister also has the right to appeal against his conviction.
His government's battle with the Supreme Court began shortly after Mr Zardari took office in 2008.
In early 2009, the Supreme Court overturned a controversial amnesty dating from the period of former President Pervez Musharraf which protected President Zardari and hundreds of other politicians from being prosecuted for corruption. (BBC)