Former Prime Minister Nawaz Sharif is likely to assume power. His fortunes were boosted by an army-led crackdown on his rival Imran Khan, whose candidates still won the largest number of votes.