President Asif Zardari won elections in 2008
Pakistan's Supreme Court has ruled that a decree protecting President Asif Zardari and some of his allies against charges of corruption is 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 indicted for corruption, charges he says were politically motivated.
Chief Justice Iftikhar Chaudhry read out the ruling of the 17-judge bench, declaring the amnesty "void" and unconstitutional.
In its ruling, the court said the law "seems to be against national interests thus it violates the provisions of the constitution".
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.
The BBC's Aleem Maqbool, in Islamabad, says 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.
Our correspondent says that Mr Zardari and his government will come under pressure to step down on moral grounds, though there are no signs that this is likely to happen.
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.