Denmark's center-right opposition won parliamentary elections Thursday after surprisingly strong gains by an anti-immigration ally pushed it to victory.
With virtually all votes counted, early official results showed the opposition bloc led by former prime minister Lars Lokke Rasmussen winning 90 seats in the 179-member parliament. Incumbent Prime Minister Helle Thorning-Schmidt's center-left bloc held 85 seats.
Early Friday, Thorning-Schmidt conceded defeat and said she will quit as the head of her Social Democrat Party.
Denmark's first female head of government, Thorning-Schmidt had called early elections hoping to capitalize on an economic recovery that followed stiff reforms imposed after she took office four years ago.
But Rasmussen's campaign focused on reminding voters how Thorning-Schmidt cut unemployment benefits and student aid as the economy slumped in the months after she took office.
The right-wing, anti-immigrant Danish People's Party -- part of the opposition alliance -- was shown winning just over 21 percent of the vote, vaulting past its liberal allies to become the second largest party in parliament. It was not clear early Friday whether the party would enter a government for the first time in its 20-year history.