But with the ballot count nearly complete , the parties of slain former Prime Minister Benazir Bhutto and former Prime Minister Nawaz Sharif -- the leader Musharraf ousted -- had won enough seats to form a new government .