Sharif was Pakistan's prime minister for two terms, once from 1990 to 1993 and again in 1997.
In 1999, he was overthrown by Pervez Musharraf, whom he had appointed chief of Pakistan's military, in a bloodless coup.
Although his premiership was beset by corruption claims, Sharif has been able to rebuild his political credibility on the back of his opposition to Musharraf's rule.
His stance against the former general won him new support, while Benazir Bhutto, another ex-prime minister, lost backers by negotiating for a possible power-sharing deal with Musharraf ahead of the elections.
The scion of a wealthy dynasty with interests in steel, sugar and paper, Sharif was handpicked by Zia ul-Haq, Pakistan's then-military ruler, in 1981 to become one of the youngest ever finance ministers for Punjab province.
As chief minister of Punjab from 1988 to 1990, Sharif challenged Bhutto, who became prime minister after Zia's death in an aeroplane explosion.
Sharif - with the military's blessing - was elected prime minister after Bhutto's dismissal in 1990, but after three years he was sacked on corruption charges following differences with Ghulam Ishaq Khan, the then-president.
Instead of accepting the dismissal, Sharif launched a scathing attack on Khan, considered his former mentor and top representative of the military-led establishment.
Sharif bounced back to the premiership in 1996 after the dismissal of Bhutto's second government on corruption charges.
He then won a massive two-thirds majority in 1997 elections, which emboldened him to take on the army - the institution which has ruled Pakistan for more than half its existence since independence 60 years ago.
Sharif also moved to increase the powers of his office, reversing a constitutional amendment that allowed the president to dismiss the prime minister.
Later, Pakistan's western allies grew concerned when he sought to introduce Islamic law, with himself as the so-called "commander of the faithful".
In 1998, Sharif appointed Musharraf as chief of the army, but relations between the two soured over a skirmish with Pakistan's neighbour India in the disputed Himalayan region of Kashmir.
Suspecting that Musharraf was planning to overthrow him, he tried to sack him while the army leader was en route from Sri Lanka.
The army moved quickly, however, ending Sharif's rule in a bloodless coup, bringing Musharraf back to Pakistan and installing him as chief executive.
Musharraf had Sharif and his brother Shahbaz tried on charges of hijacking, terrorism and attempted murder and while Shahbaz and six co-defendants were acquitted in April 2000, Sharif himself was convicted and sentenced to life imprisonment.
In December 2000, Sharif and 19 members of his extended family left Pakistan quietly for Saudi Arabia.
After returning from seven years of exile on November 25, Sharif submitted his nomination papers, only to be banned from the polls.
The Electoral Commission said it was upholding objections from other candidates that Sharif was ineligible to run because he was convicted of criminal charges in the wake of Musharraf’s coup.
Sharif says the convictions were politically motivated, and his exclusion from the vote is seen by the opposition as the result of pressure on election officials by Musharraf.
Having now joined forces with Bhutto to oppose Musharraf, the two long-time political rivals are seeking to have a list of demands met by the government on penalty of boycotting January's polls.