'Powerful and popular'
Al Jazeera's Mike Hanna, reporting from Islamabad, said: "The fact that Nawaz Sharif and his brother, Shahbaz, are now allowed back in the political arena could change the face of Pakistani politics.
"You've had a man - who many regard as the most powerful and popular politician in the country - being left out of the political fold because of convictions that he always argued were politically motivated.
"Nawaz Sharif can now ... re-enter parliament as a member and, should there be a constitutional amendment that allows him to stand for a third time, the path to the prime ministership would be open."
Supporters outside the court waved placards as they celebrated the decision.
Raja Zafrul Haq, the chairman of Sharif's PML-N party, told Al Jazeera: "I think the whole nation is today celebrating ... after nine-and-a-half years of a very dark period, where decisions were taken by kangaroo courts to disbar them [the Sharif brothers] from contesting the elections."
Haq confirmed that Sharif would stand in the next elections, saying he would "bring more sanity, more stability and more confidence in the democratic institutions".
A February 25 court decision disqualified Sharif and his younger brother Shahbaz, the chief minister of the Punjab province, from holding office and standing in elections.
The ruling led to mass protests before the government backed down and allowed him to appeal the decision.