A weakened Prime Minister Justin Trudeau set out Tuesday to secure the support of smaller parties he will need to form a government after winning Canada's nail-biter general election but falling short of a majority.

Supporters of Liberal party candidate, Justin Trudeau, react to the announcements of the first election results Supporters of Liberal party candidate, Justin Trudeau, react to the announcements of the first election results Photo: AFP / Sebastien ST-JEAN

Trudeau's Liberals took 157 seats in the 338-member House of Commons, down from a comfortable majority of 184 in the last ballot (and from 177 at the dissolution of parliament), official results showed.

Canadian Prime Minister Justin Trudeau celebrated with his wife Sophie Gregoire after his Liberal Patry was declared winners or leading in a majority of the nation's electoral districts Canadian Prime Minister Justin Trudeau celebrated with his wife Sophie Gregoire after his Liberal Patry was declared winners or leading in a majority of the nation's electoral districts Photo: GETTY IMAGES NORTH AMERICA / Cole Burston

The standard-bearer for progressivism will now have to seek some kind of accommodation with the Bloc Quebecois or the New Democratic Party (NDP) to consolidate his position.

Conservative leader Andrew Scheer warned that 'Canada is a country that is further divided' in his election concession speech Conservative leader Andrew Scheer warned that 'Canada is a country that is further divided' in his election concession speech Photo: AFP / Geoff Robins

Before launching talks with their leaders Trudeau greeted people at a subway station in Montreal and posed for selfies.

He was scheduled to address the nation on Wednesday.

NDP leader Jagmeet Singh, a leftist former criminal defense lawyer, is the first non-white leader of a federal political party in Canada NDP leader Jagmeet Singh, a leftist former criminal defense lawyer, is the first non-white leader of a federal political party in Canada Photo: AFP / Don MacKinnon

Monday evening Trudeau received congratulations from US President Donald Trump and on Tuesday from European Council President Donald Tusk.

Liberal Leader and Canadian Prime Minister Justin Trudeau will now have to form an alliance with one or more smaller parties in order to govern a fractured nation Liberal Leader and Canadian Prime Minister Justin Trudeau will now have to form an alliance with one or more smaller parties in order to govern a fractured nation Photo: GETTY IMAGES NORTH AMERICA / Cole Burston

"From coast to coast to coast, tonight Canadians rejected division and negativity," Trudeau said in his victory speech.

Canadian parliament projection as of 0500 GMT Canadian parliament projection as of 0500 GMT Photo: AFP / Jonathan WALTER

"And they rejected cuts and austerity and voted in favor of a progressive agenda and strong action on climate change."

Vindication at a cost

The win, after a horse race with the Tories, was a vindication for Trudeau, amid a campaign in which his Liberals lost support across Canada.

Photo: AFPTV / Julien BESSET

Going into the elections his golden-boy image had already been damaged by ethics lapses in the handling of the bribery prosecution of engineering giant SNC-Lavalin. His popularity took a further hit with the emergence during the campaign of old photographs of him in blackface makeup.

Prime Minister Justin Trudeau celebrates his victory with his supporters at the Palais des Congres in Montreal Prime Minister Justin Trudeau celebrates his victory with his supporters at the Palais des Congres in Montreal Photo: AFP / Sebastien ST-JEAN

The scandals, which also included his bullying of his attorney general, could still be investigated by federal police.

Photo: AFPTV / Julien BESSET

Defeated Conservative leader Andrew Scheer warned that Canada's oil sector, which is struggling with low prices and a lack of pipeline capacity, is "under attack" from climate activists and government policies.

He said the environmental protections of the Trudeau Liberals, who campaigned for tougher climate action, could be further devastating.

Main socio-economic indicators for Canada. Main socio-economic indicators for Canada. Photo: AFP / Anne-Sophie THILL

Trudeau "must be willing to change course, to stop his attacks on the energy sector, and to recognize when western Canada succeeds all of Canada succeeds," said Scheer.

Photo: AFPTV / Julien BESSET

The Conservatives won 121 seats but beat the Liberals in the popular vote, taking 34.4 percent to their 33.1 percent.

Although Trudeau did better than expected, Scheer issued a warning to the prime minister, saying Canadians had "passed judgment" on him and the Liberals.

"We have put him on notice, his leadership is damaged and his government will end soon and when that time comes, the Conservatives will be ready and we will win!"

The nation is deeply divided. There is a resurgence of Quebec nationalism and a growing sense in the western provinces of oil-rich Alberta and Saskatchewan of alienation within the federation.

For now Trudeau faces the tough task of forming a government, for which he will have to take into account the demands of minority parties.

'Open minds'

Yves-Francois Blanchet, head of the Bloc Quebecois, a down-and-out party that scored a big comeback on Monday, said he can work with the new government if the interests of French-speaking Quebec are preserved.

"Our top consideration is Quebec," said Blanchet, whose party will have 32 seats in the next parliament.

"We will do things on a case-by-case basis. If it helps Quebec, we'll be in favor. If it doesn't, we won't," he said.

At a news conference on Tuesday, Blanchet signalled that he would push back against federal challenges of a new Quebec secularism law.

"I also don't like our money being invested in oil because it's destroying the climate," he said, knocking Trudeau's nationalization of an Alberta-to-British Columbia pipeline last year in order to increase crude exports.

NDP leader Jagmeet Singh, a leftist former criminal defense lawyer and the first non-white leader of a federal political party in Canada, promised to be constructive.

"We'll approach building the new parliament with open minds and open hearts," Singh said Tuesday, listing priorities such as affordable housing, "help for students" and "real action on climate justice."

He also said he would continue to resist Ottawa's support for the Trans Mountain pipeline project connecting Alberta's oil sands to the Pacific coast, for shipping overseas.

And, he said, he will press Trudeau to take a second look at election reforms promised in the 2015 ballot but abandoned in office, to get rid of Canada's first-past-the-post system in favor of proportional representation.