The Swedish general election has left the two main political blocs almost tied, with the anti-immigration party making gains on its previous results.

With nearly all ballots counted, the governing centre-left coalition is marginally ahead of its centre-right Alliance rivals, with around 40% each.

The nationalist Sweden Democrats (SD) have won about 18% of the vote, up from 12.9% in the previous election.

A protracted battle to form a working coalition now looks certain.

Sweden uses a system of proportional representation, under which each party is allocated a number of seats in each constituency that is broadly in line with its share of the vote.