Originally a supporter of the Pakistan Peoples Party, Jamali emerged from the politics of Balochistan under military governor Rahimuddin Khan during the 1970s. He became a national figure as part of the government of Nawaz Sharif, and was Chief Minister of Balochistan for two non-consecutive terms (from June–December 1988 and November 1996 –February 1997). Although he was a senior leader in the Pakistan Muslim League (PML) and Sharif's confidant, relations between Jamali and Sharif cooled and Jamali joined the Pakistan Muslim League (Q) after the 1999 coup led by General Pervez Musharraf. In the 2002 general election, Jamali won his bid for the office of Prime Minister after his supporters and colleagues crossed party lines to support him. On 21 November 2002 Jamali was appointed the 13th Prime Minister of Pakistan-designate. He took the oath on 23 November 2002, serving until he unexpectedly announced his resignation in 2004. He is the fifth shortest-serving democratically elected Prime Minister in the history of Pakistan.