Although incarcerated, he nominally served in Parliament after being elected to the National Assembly in 1990 and Senate in 1997. He was released from jail in 2004 and went into self-exile to Dubai, but returned when Bhutto was assassinated on 27 December 2007. As the new Co-Chairman of the PPP, he led his party to victory in the 2008 general elections. He spearheaded a coalition that forced military ruler Pervez Musharraf to resign, and was elected President on 6 September 2008. He was acquitted of various criminal charges the same year.