In Oct., 1999, Prime Minister Nawaz Sharif attempted to remove Musharraf by refusing his returning flight landing rights in Pakistan. The move led to a coup by Musharraf, who became chief executive; he appointed himself president 20 months later. A controversial referendum in 2002 extended his rule for five years. Musharraf was reelected in 2007, but his right to run while still army chief was challenged; before the supreme court could rule, he suspended the constitution, declared emergency rule, and dismissed the court members who seemed likely to rule against him. After the challenges were dismissed, he resigned (Nov., 2007) as army chief. The subsequent election victory (Feb., 2008) by opposition parties and the establishment of an opposition coalition government undermined his position, and after the coalition, at the instigation of Sharif, moved to impeach him, he resigned from office (Aug., 2008). A declared supporter of a democratic, nonfundamentalist Islamic Pakistan and a supporter as well of the U.S. war on terror, Musharraf twice was the target of assassination attempts while president.
See his memoirs (2006).