Profile: Nawaz Sharif
Ousted in a 1999 military coup, Nawaz Sharif became Pakistan's prime minister for a record third term after staging a triumphant comeback in parliamentary elections in 2013.
It was also a historic moment for Pakistan as it was the first transition from one democratically elected government to another since independence in 1947.
But his last period in office was marred by upheavals - starting with a six-month opposition blockade of the capital Islamabad, and ending with court proceedings over corruption allegations which eventually led to the Supreme Court disqualifying him in July 2017. His resignation followed shortly afterwards.
Nawaz Sharif, 67, has been one of the country's leading politicians for most of the last 30 years.
Before winning his third term, Mr Sharif served as prime minister from 1990 to 1993 and from 1997 until the 1999 bloodless coup.
Like many of his contemporaries he has survived sustained corruption allegations against him.
President of the Pakistan Muslim League-N (PML-N) and owner of Ittefaq Group, a leading steel mill conglomerate, he is among the country's wealthiest industrialists.
A protégé of military leader Gen Zia ul-Haq - who ruled Pakistan from 1977 to 1988 - Mr Sharif is perhaps best known outside Pakistan for ordering the country's first nuclear tests in 1998.
Nawaz Sharif was born into the family of a prominent Lahore industrialist in 1949 and made his mark in politics representing an urban constituency.
He first came to national prominence during the early days of Gen Zia's martial law, serving as Punjab province's finance and then chief minister from 1985-1990.
Observers recall a not particularly impressive political figure, who nonetheless proved himself an adept administrator. He became prime minister in 1990, but was dismissed in 1993, clearing the way for the then opposition leader, Benazir Bhutto, to form a government.
After becoming prime minister again in 1997 with a comfortable majority, Mr Sharif appeared to dominate the political landscape and exerted a powerful hold over all the country's major institutions - apart from the army.
Frustrated by opposition in the parliament, he tried to pass a constitutional amendment that would have enabled him to enforce Sharia law. He also confronted other power centres - a mob of his supporters ransacked the Supreme Court and he tried to rein in Pakistan's powerful military.
Mr Sharif's overthrow by then army chief Pervez Musharraf showed how dangerous it was for any politician to attempt to curtail the military's influence in Pakistan with its history of coups.
Mr Sharif was arrested, jailed and eventually sentenced to life imprisonment on charges of hijacking and terrorism. He was also convicted of corruption and banned for life from political activities.
But an alleged deal, brokered by the Saudis, saved him and other family members from being put behind bars. Mr Sharif and 40 members of his family were exiled to Saudi Arabia for what was supposed to be a period of 10 years.
Owen Bennett-Jones, BBC Islamabad correspondent at the time, recalls that when Mr Sharif was removed from power, many Pakistanis expressed great relief, describing him as corrupt, incompetent and power-hungry.
Mr Sharif's time in the political wilderness lasted until his triumphal return to Pakistan in 2007 following a deal with the military.
Back in Pakistan, he patiently bided his time in opposition. His party won about a quarter of parliamentary seats in 2008 elections.
Though tipped to win the 2013 elections he surprised many with the scale of his victory. He also saw off a spirited challenge from the revitalised party of former cricketer Imran Khan in the politically crucial Punjab province.
After assuming power, he faced a six-month blockade of Islamabad by Mr Khan's PTI party which accused him of rigging elections.
There were public accusations the blockade had been launched at the instigation of some officials in the military's notorious Inter-Services Intelligence (ISI) agency.
Analysts believe the military establishment wanted to put Mr Sharif under pressure so as to prevent him from expanding trading ties with India, a process begun under the previous government.
Ahead of his third term, Mr Sharif had promised to turn Pakistan into an "Asian tiger", with new infrastructure and a government with "zero tolerance for corruption".
But problems have multiplied and the only economic highlight - the Chinese-funded $56bn China-Pakistan economic corridor - is years away from materialising.
Last year the Panama Papers leaks unleashed a new threat for the prime minister which resulted in claims of corruption being investigated by the Supreme Court.
The allegations relate to his family's ownership of apartments in an upmarket area of central London, with questions being raised over the money trail that led to the acquisition of those properties.
Mr Sharif denied all wrongdoing and refused to resign from office until the Supreme Court voted unanimously to disqualify him from office.
One judge said: "He is no more eligible to be an honest member of the parliament."