Copenhagen: Denmark's opposition coalition ousted the incumbent centre-left government in the 2015 parliamentary elections, official data showed.
With all votes counted, the centre-right blue bloc led by former prime minister Lars Loekke Rasmussen won 52.3 percent of the vote, while the ruling centre-left red bloc headed by incumbent Prime Minister Helle Thorning-Schmidt gained 47.7 percent, according to Danish news agency Ritzau.
The blue bloc garnered 90 seats, ensuring an absolute majority in the 179-member Danish parliament.
The Liberal Party, known as Venstre in Danish and led by Rasmussen, has captured 19.5 percent of the vote and 34 seats. It however saw its support dropping 7.2 percent from the previous elections in 2011, losing 13 seats.
The centre-right victory also means that Rasmussen is set to reassume the prime minister's position, four years after he was voted out of government.
"The Liberals has not had a particularly good election, but there is a majority of parties that believe Denmark should have a new government. And that gives us an opportunity, but just an opportunity to get the keys back," Rasmussen said in parliament after after the counting of votes.
He got straight on to the issue of immigration by saying that "we want a Denmark where we can get control of the flow of refugees”, Xinhua news agency reported.
“So whenever a Dane looks into the eyes of a foreigner on the train or in the city, they will be looking into the eyes of a person who wants to embrace Denmark," he said.
Rasmussen also talked about welfare, vowing to focus on core welfare issues where the sick, the old and the vulnerable will be prioritised.
Thorning-Schmidt's Social Democratic Party harvested 26.3 percent of the vote and 47 seats, making it Denmark's single-largest party in parliament.
Meanwhile, the far-right, Eurosceptic Danish People's Party, headed by Kristian Thulesen Dahl, overtook the Liberals as Denmark's second largest party in parliament with a remarkable 21.1 percent of the vote.
The blue bloc had agreed that Rasmussen will take the post as prime minister should the opposition coalition win.
The Danish People's Party's backing of Rasmussen as prime minister has been the determining factor for the blue bloc to win the 2015 elections.
The far-left Red-Green Alliance, known as Enhedslisten, came in fourth with 14 seats, followed by the Liberal Alliance with 13 seats.
The left-leaning party, The Alternative, which was founded by former Social Liberal Uffe Elbaek in February 2015, won 4.8 percent of the vote and nine seats, ahead of the Social Liberals that won only 4.6 percent of the vote and thereby eight seats.
The Socialist People's Party, the centre-left coalition's support party, saw its support dropping 5 percent to 4.2 percent, getting only seven seats.
It quit the incumbent coalition government in 2014 in protest over the partial sale of the state-owned power company DONG Energy to US-based investment bank Goldman Sachs.
The Conservatives, who used to be the key partner of the centre-right coalition, are now the smallest party in parliament with 3.4 percent of the vote and six seats.
The Christian Democrats party won no seat in parliament with a mere 0.8 percent of the vote.
Under Danish law, 175 of the 179 members in the Danish parliament will be elected in mainland Denmark, while two each will be elected from Greenland and the Faroe Islands, which are autonomous territories of Denmark.
Danish governments are often characterised by minority administrations, aided by one or more supporting parties.
Basically, Danish politics is based on consensus politics. Since 1909, no single party has had majority in parliament.