The left-wing opposition led by former PM Andersson held a narrow lead, according to exit polls.