Canada election
Liberal leader Justin Trudeau marks his ballot accompanied by his son Xavier in Montreal, Quebec, October 19, 2015.Reuters

The Liberal Party has left behind the incumbent Conservatives in the federal election in Canada, with Justin Trudeau set to replace Stephen Harper as the prime minister. 

The Liberals have been elected in 184 seats, while the Conservatives have won in 99, according to Canada's CBC News. 

The loss prompted Harper to step down as Conservative leader after he was denied a fourth consecutive term as the prime minister. 

However, the Conservatives will be able to form the Opposition, gaining more votes than the New Democratic Party.

Justin will be the second Trudeau to lead Canada, after his father Pierre Elliott Trudeau served as prime minister for nearly 16 years. 

The Liberal government will bring about a few significant changes to Canada's policy, with the party stating that it seeks to improve the country's relations with the United States. 

Trudeau had also said before the election that he would pull Canada out of combat missions against the ISIS in the Middle East and said that he country will instead help train local fighters to take on the militants.