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 a tumultuous period for him and the country which also saw frosty ties with India.
When Mr 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.
Mr Gilani became Pakistan's 17th Prime Minister in March 2008 when Pakistan People's Party (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.
Mr Gilani, who shared good relations with Prime Minister Manmohan Singh, also led his government's efforts to revive ties with India.
Born in 1952 in Karachi in a prominent family of landowners, Mr 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.
Mr 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.
Mr 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 when he was the Speaker of the Parliament from 1993 to 1997.
The case is regarded by many as politically-motivated and Mr 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, Mr 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 Mr Gilani sacked the defence secretary Khalid Naeem Lodhi, considered close to 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 Mr Zardari.
Mr Gilani insisted that he was standing by the constitution by not ordering the reopening of the cases as Mr 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.
Mr Gilani himself appeared before the Supreme Court to contest the charges, and upon conviction was given a symbolic sentence.
The tenure of Mr 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.
Story first published:
June 20, 2012 01:49 IST