Gilani - The PPP loyalist who dared the judiciary
Islamabad: Engaged in a continued tug-of-war for supremacy with the military on one side, and an assertive judiciary on the other, Yousuf Raza Gilani's four years at Pakistan's helm was indeed a tumultuous period for him and the country which also saw frosty ties with India.
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-Toiba 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.
Gilani spent five years in prison during the rule of former President Pervez Musharraf after being convicted by a military-controlled anti-corruption agency for misusing his authority as Speaker of the Parliament in 1993-97.
The case is regarded by many as politically-motivated and Gilani said the charges were "concocted and fabricated to pressurise him to leave the PPP".
During a term that was marked by a tumultuous and blood fight against a raging Taliban militancy, Gilani took on the powerful military to assert the authority of the civilian government and also sought to curb the powers of the judiciary under the fiercely independent-minded Chief Justice Iftikhar Choudhary.
The powerful Pakistani army and the civilian government went on a collision course after Gilani sacked the defence secretary Khalid Naeem Lodhi, considered close to the army chief General Ashfaq Parvez Kayani, over the memogate scandal.
He also told the Army and intelligence chiefs not to bypass the civilian government in making statements.
His confrontation with the Supreme Court stemmed from his stoic refusal to reopen graft cases against Zardari.
Gilani insisted that he was standing by the constitution by not ordering the reopening of the cases as Zardari enjoyed immunity as president.
His disqualification as a member of parliament and hence as the prime minister capped nearly 30 months of bitter feud between the government and the Supreme Court that convicted him of April 26 of having committed contempt of court for failing to comply with orders relating to reopening the decades-old corruption cases.
Gilani himself appeared before the Supreme Court to contest the charges, and upon conviction was given a symbolic sentence.
The tenure of Gilani also saw Pakistan's ties with the US plunge to an all-time low, as the US conducted a unilateral raid to take out its biggest target al Qaeda chief Osama bin Laden.