ISLAMABAD (CNN) -- The Pakistani government came under attack from two angles Tuesday as the Supreme Court ordered the arrest of the country's prime minister and a rowdy anti-government rally took place near the national parliament.
Even by the standards of Pakistan's often turbulent politics, it was a stormy day that ratcheted tensions ahead of national elections later this year.
The Supreme Court, which has clashed repeatedly with Pakistan's political leaders in recent years, issued the arrest order for Prime Minister Raja Pervez Ashraf and a number of other officials over allegations of illegal payments for electricity-generating projects when Ashraf was minister for water and power.
Speaking on local broadcaster Dunya News, Fawad Chaudhry, one of Ashraf's advisers, called the court's decision "a soft coup" against democracy. The prime minister has consistently denied the allegations, he said.
Last year, the Supreme Court ousted Ashraf's predecessor, Yousuf Raza Gilani, in a contempt case related to old corruption charges against President Asif Ali Zardari.
The Karachi Stock Exchange crashed Tuesday on the news of the Supreme Court action. The KSE shed 500 points in just 10 minutes.
The arrest order for Ashraf was music to the ears of supporters of Tahir ul Qadri, a Muslim cleric who wants Pakistan's leaders thrown out in favor of a caretaker government to bring about electoral reform and flush out corruption.
The demonstrators welcomed the court decision, chanting, "Long live the Supreme Court."
Just ahead of the court's announcement, Qadri, housed in a bulletproof container, addressed thousands of people gathered near the parliament in central Islamabad, singling out the judiciary and the military as the only two institutions that he said were functioning in Pakistan.
He had previously called on the civilian government to disband by Tuesday morning to allow the formation of the caretaker government. That deadline has passed, and he has urged his supporters to continue their demonstration in central Islamabad and to double their numbers each day.
Claims of a conspiracy
The timing of the arrest order against Ashraf appeared to play to Qadri's advantage.
A senior official of the governing Pakistan People's Party, which is headed by Zardari, called the court's decision "a conspiracy."
Speaking on Dunya News, Sharjeel Memon suggested the order had "a direct connection" with Qadri's movement.
Corruption is widely considered a chronic problem in Pakistan's political system; Zardari has served prison time on corruption charges.
And during his time as minister of water and power, Ashraf is accused of accepting kickbacks from power companies to approve expensive projects, known as Rental Power Projects, that in reality generated very little electricity.
Pakistan regularly grapples with chronic power outages, with its booming population putting a strain on the public power grid. So the government had to rely on private power producers.
Ashraf is alleged to have used the kickback from these private firms to buy property abroad. The accusations earned him the derisive nickname "Rental Raja," and the Supreme Court eventually stripped him of his former ministerial role.
If authorities follow through on the court's order and arrest Ashraf, he will remain prime minister for the time being, said Salman Akram Raja, a constitutional expert.
"The court hasn't convicted him; he is an accused at this stage," he said in an interview on local broadcaster Geo News.
The political drama set off by the Supreme Court followed unrest in Islamabad's streets earlier Tuesday.
Brief clashes took place between security forces and Qadri's supporters as the crowd moved into the area near the parliament where protests regularly take place.
Local media reported that police fired shots into the air and lobbed tear gas at the crowd. The unrest subsided after 10 to 15 minutes, and the protesters continued peacefully.
Qadri's supporters accused police of starting the unrest by trying to arrest the cleric, but Interior Minister Rehman Malik said police were doing their best to protect Qadri and control the crowd. He said the reported clashes are under investigation.
Footage from local broadcaster Ary News showed chaotic scenes of people running and objects being thrown as gunshots echoed in the background.
'The beginning of the revolution'
Qadri had already held a nighttime rally around 2 a.m. Tuesday after he and his convoy of followers arrived in Islamabad on Monday after traveling for more than a day from the eastern city of Lahore.
"It's the beginning of the revolution," he said, referring to Zardari as "ex-president" and to Ashraf as "ex-prime minister."
But the group's numbers fell far short of what organizers of the "Million Man March" had predicted, with witnesses estimating that about 20,000 people took part.
Malik, who visited rally sites Monday by helicopter, said the turnout numbers showed that Qadri's event had "badly failed."
Qadri had promised a Pakistani equivalent of Egypt's Tahrir Square protests.
After eight years in Canada, Qadri returned last month to Pakistan, where he is waging a campaign against the political elite. He has called for a caretaker administration to replace the current government and to carry out election reforms.
His suggestion that the judiciary and the military weigh in on the composition of the interim government has raised concerns in a country where military leaders have repeatedly seized power and ruled for long periods of time.
Some Pakistanis, noting that Qadri served as a lawmaker in the early 2000s, when Gen. Pervez Musharraf was leading the country, have suggested he may be working on behalf of the military.
Qadri denies those allegations and maintains he is simply seeking to ensure a corruption-free electoral process.
The current government and opposition have rejected his requests for a caretaker administration, insisting that nothing will stand in the way of timely elections and the democratic process.
"We will not succumb to these illegal demands," Malik said last week.
If this year's elections take place without major difficulties, it would represent the first time in Pakistan's history that a civilian government made it through a five-year term.
CNN's Nasir Habib reported from Islamabad, and Jethro Mullen wrote from Hong Kong. CNN's Shaan Khan in Islamabad contributed to this report.