Pakistan Muslim League-Nawaz (PML-N) restricted it to a five-year term only.
A seven-member bench, headed by Chief Justice Qazi Faez Isa, on Monday ruled that no person can be barred for a lifetime from running in elections if they are disqualified under Article 62 (1)(f).
The bench with a 6 to 1 split judgment abolished the lifetime disqualification and thus went against the judgment of its five-member bench which in 2018 had ruled in favor of lifetime disqualification.
Justice Yahya Afridi differed from the other six judges and wrote a note of dissent in favour of lifelong disqualification.
The verdict has determined once and for all the controversy around the period of disqualification under Article 62(1)(f) of the Constitution and the Elections Act 2017.
Sharif, former prime minister and also a frontrunner for the fourth term in the February 8 general elections, was disqualified in the Panama Papers case in 2017. His rival Imran Khan, who was disqualified in the Toshakhana corruption case last year, also was hit by the same law.