As results began to trickle in Thursday evening, the party of former prime minister Nawaz Sharif -- the military's preferred party of the moment -- was still expected to win, but it did not look like it would pull off the easy victory that was widely predicted.