The Supreme Court order came as protesters led by populist cleric Tahir-ul Qadri massed near parliament on the third day of a march, calling for the immediate dissolution of the government.

A general election is due to be held by mid-May. But Mr Qadri wants a caretaker government set up immediately, in consultation with the military and the judiciary, to implement key reforms before the polls are held.

His demands are seen by critics as a ploy by elements of the establishment, particularly the armed forces, to delay the elections and sow political chaos in the nuclear-armed state, which was ruled by the military for decades.

Security officials estimated the size of the Islamabad crowd at between 25,000 and 50,000, which would make it the largest political protest in the capital since the government led by the Pakistan People's Party (PPP) was elected in 2008.

Opposition politician Imran Khan called on Pakistani President Asif Ali Zardari to resign immediately and for the government to announce a date for elections.

The Supreme Court order signed by the chief justice, who has been at loggerheads for years with Mr Zardari's government, will heighten an already febrile political atmosphere.

Analysts said the ruling would not force Mr Ashraf out of office. But they warned that even if the timing was a coincidence, coming at the time of the protest it would fuel rumours about a judicial-military conspiracy.

The court order instructed officials to arrest "without any hesitation" those accused in the case, and for the chairman and officials from the National Accountability Bureau corruption watchdog to report to the court on Thursday.

Mr Qadri's supporters, digging in for the long haul with stocks of food and bedding, cheered and danced when told of the order against Mr Ashraf.

"This is our first victory. We will stay here until all our demands are met," Mr Qadri's deputy Sadiq Qureshi told the crowd.

The main index of the Karachi Stock Exchange fell sharply on news of the court order, losing nearly three per cent in a little over half an hour. Markets closed early and people went home in panic in parts of the city, which has a tradition of unrest.

Mr Ashraf took office last June when the Supreme Court threw his predecessor Yousuf Raza Gilani out of office and convicted him of contempt for refusing to ask Swiss authorities to reopen corruption cases against the president.

Under the constitution, people convicted of certain crimes cannot be members of parliament. But senior lawyer Salman Akram Raja said the arrest order against Mr Ashraf would not necessarily bring him down.

"Ashraf is only facing allegations and if he is detained for some investigation, even then he remains prime minister."

Political analyst and retired general Talat Masood called the timing of the supreme court ruling "amazing".

"It came when Qadri is saying the judiciary is great, army is great. It is adding weight to the instability in the country. In a way it is acting as a catalyst for the dissolution of this government," he told AFP.

Mr Qadri, a frenzied orator, blames a corrupt government for the ills of a country beset by a fragile economy and Islamist violence.

He led his followers into the capital overnight, the climax of a 38-hour journey from the eastern city of Lahore.

"I want to ask you to stay until tomorrow," Mr Qadri declared, speaking from inside a bulletproof box.

"Hopefully after tomorrow there will be no need to stay any longer."

Police earlier clashed with stone throwers and protesters brandishing sticks, shooting into the air and firing tear gas. Eight officers were injured.

Organisers of the rally accused police of opening fire and of attempting to arrest Mr Qadri. The government has called his demands anti-constitutional.

Mr Qadri, who runs a global educational and religious organisation, returned to Pakistan last month from Canada, where he also has citizenship.

His supporters say his calls to end corruption and implement reforms could be the solution to Pakistan's serious problems.

But if held on schedule, the election will mark the first democratic transition between two civilian governments in Pakistan's 65-year history.

News.com.au's Privacy Policy includes important information about our collection, use and disclosure of your personal information (including to provide you with targeted content and advertising based on your online activities). It explains that if you do not provide us with information we have requested from you, we may not be able to provide you with the goods and services you require. It also explains how you can access or seek correction of your personal information, how you can complain about a breach of the Australian Privacy Principles and how we will deal with a complaint of that nature.