Denmark's opposition parties have beaten the governing coalition after a close general election.
With all mainland votes counted, the centre-right group led by ex-PM Lars Lokke Rasmussen beat PM Helle Thorning-Schmidt's centre-left coalition, although her party is the largest.