Mr Sharif is one of the most popular politicians in Pakistan
Pakistan's Supreme Court has acquitted opposition head Nawaz Sharif of hijacking charges, removing the final ban on him running for public office.
Mr Sharif was found guilty of hijacking then army chief General Pervez Musharraf's plane in 1999, when he ordered it to be diverted.
Mr Sharif was then toppled as prime minster in a coup led by Gen Musharraf.
He was convicted by the Sindh High Court but he has always maintained that the charges were politically motivated.
Mr Sharif's government had ordered officials to divert Gen Musharraf's plane away from Karachi and to a smaller city in Sindh.
While he was imprisoned, Mr Sharif agreed to go into exile under a deal with Gen Musharraf who had taken over as Pakistan's president.
Mr Sharif ended his exile ahead of the 2008 elections but was prevented from contesting due to the court conviction.
Pakistan's president and prime minister were swift to congratulate Mr Sharif on the court ruling.
The BBC's M Ilyas Khan in Islamabad says Mr Sharif's acquittal will be viewed as a positive development which helps strengthen democracy.
It also puts Mr Sharif on an even keel with President Asif Ali Zardari of the ruling Pakistan People's Party (PPP). Charges against him were withdrawn from court by the earlier Musharraf government in the name of "national" reconciliation.
But the court verdict restores to the political stage a potentially formidable opponent to Mr Zardari, correspondents say.
Mr Sharif has held office previously and can point to substantial political support across the country.
In its ruling on Friday, the Supreme Court said there was no evidence to support the charge of hijacking and acquitted Mr Sharif.
"Looking at the case from any angle - the charge of hijacking, attempt to hijack or terrorism - does not stand established against the petitioner," news agency AFP quoted from the Supreme Court ruling.
"The conviction and sentence of the appellant are set aside and he is acquitted," the order said.
The "petitioner had neither used force nor ordered its use and undisputedly no deceitful means were used," it added.
The five-judge court headed by Justice Tassaduq Hussain Jillani heard the petition in June, but initially reserved judgement.
Mr Sharif's Pakistan Muslim League-N (PML-N) party has welcomed the order.
"A judgement given by a kangaroo court nine years ago has been nullified by an independent and sovereign apex court in the light of the constitution, law and evidence on record," PML-N spokesman Siddique-ul-Farooq was quoted by AFP as saying.
In May, the Supreme Court had overturned a ban that prevented Mr Sharif and his brother Shahbaz from running for political office.
The ruling meant that Mr Sharif would be able to stand in elections due in 2013 or a parliamentary by-election before then.
The former prime minister and leader of the PML-N party is one of the most popular politicians in the country.