Media playback is unsupported on your device Media caption The BBC's Aleem Maqbool: "It took a very short time for the seven-member bench to announce their verdict"

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.

The prime minister had argued that the president, who rejects the corruption charges, has immunity as head of state.

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.

Mr Gilani's lawyers say he will appeal against his conviction.

A meeting of the senior leadership of Mr Gilani's Pakistan People's Party (PPP) after the court case expressed concern "over attempts to dismiss an elected government and an elected prime minister".

Those attending concluded that the prime minister can "only be removed in accordance with the... constitution".

The three-month trial ended on Tuesday when defence and prosecution counsels concluded their arguments.

Analysis The Supreme Court found the prime minister guilty, but sentenced him to confinement for just a few minutes - "until the rising of the court". The short order from the court was very lenient and also rather vague. The outstanding issue is whether Mr Gilani could be disqualified from office. It will depend on whether he has been convicted under a specific clause in the constitution, 63-1 (G), which would mean he is automatically disqualified from holding public office. But the court order was unclear on that point. A detailed judgement will be issued later. Meanwhile, Mr Gilani, who was flanked by supporters, left the court a free man. His standing with the public appears to have improved as he stood his ground in this case.

Arriving at the Supreme Court on Thursday morning, Mr Gilani and his fellow cabinet members were surrounded by the media and his supporters, some of whom showered him with rose petals.

He left the building shortly after the verdict was announced, having been symbolically detained for just a few minutes until the court adjourned.

The court found Mr Gilani guilty of contempt for "wilfully flouting and disregarding" its order directing him to contact the Swiss government over corruption cases against President Zardari.

This action, Thursday's order said, "is substantially detrimental to justice" and "brings this court into disrepute".

Even though Mr Gilani was found guilty, the verdict may well be viewed as a victory by the government as it would appear that for the moment he can carry on in office, the BBC's Aleem Maqbool in Islamabad reports.

He describes the mood among Gilani supporters as one of celebration, despite the conviction.

There were immediate opposition calls for Mr Gilani to step down.

"The court verdict is based on truth and reality. The prime minister himself invited this situation," opposition leader Nawaz Sharif told Geo TV.

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.

A detailed judgement from the court is still awaited.

'Immunity'

President Zardari is accused of using Swiss bank accounts to launder bribe money. He has long said the charges are politically motivated.

Image caption Critics accuse the military and judiciary of a witch hunt

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.

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.

General elections are due by early next year.