Canadian Prime Minister Justin Trudeau faces the cold reality of a minority government that will likely be forced to tilt left to survive, a move that risks upsetting the business community and stoking alienation in oil-producing provinces.
Trudeau, one of the world's most prominent progressive leaders, saw a sharp drop in support for his ruling Liberals across the country in an election on Monday that focused in part on two scandals that dogged the 47-year-old leader.
Preliminary results showed the Liberals elected or ahead in 157 of 338 seats, a drop of 20 from where they stood going into the vote. They also trailed the main opposition Conservatives in the popular vote by just over a percentage point.
The election was a disappointment for Conservative leader Andrew Scheer, who had promised to balance the federal budget and eliminate a "carbon tax" on fossil fuels.
Trudeau looks set to govern with support from the left-leaning New Democratic Party, which also lost seats but managed to do well enough to be in a position to hold the balance of power. Together, the parties would control 181 seats.
NDP leader Jagmeet Singh can now press for action on priorities such as in increase in spending on housing and healthcare.
"Those are going to continue to be our priorities. Canadians elected us with that responsibility and I take it very seriously," Singh said in Burnaby, British Columbia.
"I'm hoping that Mr. Trudeau respects the fact that there's a minority government now, which means we've got to work together."
Singh also voiced support for passage of a universal prescription drug plan, something Trudeau has promised to do, setting the stage for what could be the biggest shake-up of Canada's public healthcare system since it was created in the 1960s.
Trudeau's Liberals were already planning to run longer and deeper deficits. Their election platform called for a near doubling of the federal deficit to $C27.4 billion ($A30.4 billion) in the next fiscal year.
The NDP, which wants to invest $C15 billion in climate-change measures, also could push Trudeau to do more to combat the problem. Additional pressure for such action will come from the Green Party, which won three seats.
The danger for Trudeau is that a left turn may heighten fears in financial markets about the direction of fiscal policy and further endanger his party's standing in the oil-rich provinces of Alberta and Saskatchewan, which became a wasteland for the Liberals on Monday.
Investors are ditching bets the Bank of Canada will cut interest rates over the coming months, with the domestic economy showing resilience and the federal government set to ramp up spending next year.
Minority governments in Canada rarely last more than two and a half years. The New Democrats struck deals to help keep Liberal minority governments in power from 1972 to 1974 and in 2005.
Trudeau told supporters in a victory speech early on Tuesday that he had "a clear mandate" for a progressive agenda and more action to combat global warming.
The Conservatives won 34.4 per cent of the popular vote, with the Liberals taking 33.1 per cent, according to preliminary results.
With nearly all votes counted, the Conservatives were leading or elected in 121 seats, an improvement on their performance in 2015 but a far cry from the surge they had hoped for following a bitter six-week campaign.
Even before the election, some in the party were speculating about a leadership challenge if the party lost.
Scheer said on Tuesday he would continue to lead the party.
The Conservative leader also said Canada was more divided than ever because of Trudeau's approach and that the responsibility rested with the Liberal leader to work with other parties and "to stop attacking the energy sector."
Many in Alberta and Saskatchewan are angry about what the energy industry sees as overly stringent environmental rules that are blamed for throttling investment in the sector, which accounts for 11 per cent of Canada's gross domestic product. Those western provinces cast out every Liberal legislator.
There are also fears the election results could further delay an expansion of the government-owned Trans Mountain pipeline that would triple the flow of crude from Canada's oil sands to the British Columbia coast.
The oil sands are home to the world's third-largest crude reserves and are located entirely within Alberta. The NDP and Greens oppose the expansion.
"This truly is the worst possible outcome," said Tim Pickering, chief executive of Auspice Capital Advisors, which manages a Canadian crude oil exchange-traded fund. "We have got a Liberal minority and the balance of power shifts to the NDP and the Greens, who are completely opposed to any progressive energy policies."
In the latest sign of the struggles in Canada's energy sector, Calgary, Alberta-based oil and gas producer Husky Energy Inc announced lay-offs on Tuesday.
Trudeau also must contend with a re-energised Bloc Quebecois, the separatist party that only contests elections in the mainly French-speaking province of Quebec. It won 32 seats, more than triple its total in the 2015 election.
Trudeau's liberal image took a blow early in the campaign when photos emerged of him wearing blackface in the early 1990s and in 2001.
He had already been wrestling with fall-out from accusations he pressured former Justice Minister Jody Wilson-Raybould to help shield engineering firm SNC-Lavalin Group Inc from corruption charges. In August, a top watchdog said he had breached ethics rules.
Australian Associated Press