The powerful incumbent faced an energized opposition in presidential and parliamentary polls.