When Gilani became Pakistan's Prime Minister after a return of democracy in 2008, not many critics gave him a chance for a long innings. However, the Bhutto family loyalist showed remarkable resilience and determination to steer his democratically-elected government to a record term.
In the end, he went down to the Supreme Court, refusing to reopen graft cases against his party supremo Asif Ali Zardari.
Gilani became Pakistan's 17th prime minister in March 2008 when PPP swept to power in the post-Musharraf era.
Within months, Pakistan's ties with India suffered a major jolt when Lashkar-e-Taiba militants attacked Mumbai, killing 166 people in November.
Gilani, who shared good relations with Prime Minister Manmohan Singh, also led his government's efforts to revive ties with India and put them back on track.
Born in 1952 in Karachi in a prominent family of landowners, Gilani studied journalism before taking a plunge into politics in 1978 in the military government of General Zia-ul-Haq.
His father Makhdoom Alamdar Hussain Gilani was a former politician who played a significant role in the Pakistan Movement.
Gilani, who was initially associated with the Pakistan Muslim League (PML), was first elected to the parliament in the non-party elections of 1985, and was appointed minister for housing and works, and later railways.
But, political differences with the PML leadership soon prompted him to affiliate himself with the PPP.
He has since been a Benazir Bhutto loyalist, elected to parliament on a PPP ticket thrice, serving both as a federal minister and speaker of National Assembly. (MORE)