Pakistani lawyers celebrated after the ruling
Pakistan's main opposition has urged President Asif Zardari to resign after the Supreme Court declared an amnesty against corruption charges illegal.
The controversial law granting senior politicians amnesty was brought in by ex-President Pervez Musharraf.
The court's move opens the way to possible prosecution for Mr Zardari's political allies, although he is still protected by presidential immunity.
Mr Zardari faces several pending court cases against him in Pakistan.
Before taking office, he spent years in jail after being being indicted for corruption, charges he says were politically motivated.
BBC correspondents say that, despite the pressure on government figures to quit, there are no signs that this is likely to happen.
Siddiqul Farooq, spokesman for the opposition Pakistan Muslim League-N (PML-N) of former PM Nawaz Sharif, told the AFP news agency that Mr Zardari should resign on "moral grounds".
President Asif Zardari won elections in 2008
"All the cabinet members must immediately tender their resignations," he said.
Another senior PML-N leader, Khawaja Asif, said Mr Zardari should resign "in his own interest" and that of his party.
"It will be good for the system," he told the Associated Press news agency.
Presidential spokesman Farhatullah Babar told reporters outside the court that the ruling Pakistan People's Party (PPP) would respect the judgement.
However Mr Babar stressed that the president was protected from prosecution.
"No criminal proceedings whatsoever shall be constituted or continued in any court against the president... during the tenure of office," he said.
The BBC's M Ilyas Khan in Islamabad says that at least four governing coalition ministers will have cases revived against them.
These include Interior Minister Rehman Malik (PPP), Defence Minister Chaudhry Ahmad Mukhtar (PPP), Ports and Shipping minister Babar Khan Ghauri (from the MQM party) and another minister, Farooq Sattar (also from the MQM).
Pakistani newspapers have welcomed the Supreme Court's decision to annul the amnesty.
"Zardari: an accused president," a front page headline in The News said.
The law was introduced by Mr Musharraf in order to allow Mr Zardari's late wife, Benazir Bhutto, to return to the country and stand for office, with the aim of a possible power-sharing deal with Mr Musharraf.
She returned to Pakistan from abroad after the so-called National Reconciliation Ordinance (NRO) was signed into law, but was assassinated soon after.
It has only recently been revealed that more than 8,000 politicians and officials benefited from the legislation.
The Supreme Court has called for all these cases to be re-opened, with hundreds of senior politicians and civilian bureaucrats now facing criminal and corruption charges.
Pakistan is often ranked among the most corrupt countries in the world by anti-graft campaigners.
According to a listing produced by global watchdog Transparency International, it came 40th out of 180 countries surveyed.