Pakistan's Supreme Court has ordered the arrest of PM Raja Pervez Ashraf and 15 others over corruption allegations, raising fears of a political crisis just months ahead of an election.
Mr Ashraf denies accepting bribes when approving power generation projects as minister for water and power in 2010.
Analysts say that the move is unlikely to lead to his immediate removal.
It comes as a populist cleric led thousands of protesters in Islamabad, demanding the government resigns.
Television images showed demonstrators, led by Tahirul Qadri, celebrating and triumphantly applauding as news broke of the court's order.
The BBC's M Ilyas Khan in Islamabad says it may just be a coincidence - but to many observers the timing of the move bolsters allegations that the cleric is backed by elements of the judiciary and military.
In recent years Pakistan's government, judiciary and powerful military have been at loggerheads.
Mr Ashraf's predecessor, Yousuf Raza Gilani, was forced out as prime minister last June after the Supreme Court convicted him of contempt for failing to pursue a corruption case against the president.
Mr Ashraf was appointed in his place, but analysts predicted that his tenure would also be troubled.
The Supreme Court order says the prime minister and the others should be arrested and produced before court within 24 hours. But analysts say the prime minister's lawyers may find ways of delaying any appearance.
Dogged by controversy
The prime minister's adviser, Fawad Chaudhry, condemned the order, labelling it unconstitutional, the Associated Press news agency reports.
Mr Ashraf is set to lead the ruling Pakistan People's Party (PPP) into general elections due in May. Analysts say they expect the balance of power in the forthcoming parliamentary polls to broadly stay the same unless turnout is high, which could allow minor parties to translate popular support into seats.
He has long been a senior figure in the PPP, and has twice been a minister in the government which has been in power since 2008.
But it was his tenure as minister for water and power which is dogged by controversy.
The government needed to generate more power to deal with electricity shortages, but there were accusations of corruption from the opposition about the so-called "Rental Power Projects" devised to solve the crisis.
Critics labelled him "Raja Rental" because of the kickbacks he is alleged to have taken - he has consistently denied these claims and left the water and power post in 2011.
But many analysts say this case could simply be a continuation of the long feud between the PPP-led government and the judiciary.
And there have also been chaotic scenes in Islamabad after a long-planned march from Lahore to the capital by Dr Qadri culminated in a mass rally.
Clashes briefly erupted on Tuesday before Dr Qadri addressed his thousands of supporters camped near parliament, vowing to continue his mass protest indefinitely.
The cleric has said he wants the military and judiciary to be involved in installing a caretaker government to oversee the forthcoming elections.
But the government has accused him of trying to postpone elections due by May.