Musharraf rose to national prominence when he was promoted to four-star general by Prime Minister Nawaz Sharif in 1998, making Musharraf the head of the armed forces. He led the Kargil infiltration that almost brought India and Pakistan to a full-fledged war in 1999. After months of contentious relations between Sharif and Musharraf, Sharif unsuccessfully attempted to remove Musharraf as the army's leader. In retaliation, the army staged a coup d'état in 1999, which allowed Musharraf to take over Pakistan as president in 2001. He subsequently placed Sharif under strict house arrest before launching official criminal proceedings against him.