Justin Trudeau and the Liberals shook off a lacklustre campaign and his own uneven performance on the hustings to win another mandate. But it's a minority mandate, one that requires him to work with at least one of the opposition parties to get anything done.

If last night's speeches were any indication, co-operation will be hard to find.

Trudeau, Conservative Leader Andrew Scheer and NDP Leader Jagmeet Singh took the stage in the wee hours of the morning at almost the same time — leaving the networks to either choose one speech to cover or let all three talk over each other.

For Trudeau, the election results could have been worse. They could also have been better.

The Liberals stand to lose in the neighbourhood of 30 seats across the country. They were shut out entirely in Saskatchewan and Alberta, and saw the Bloc Québécois re-emerge as a powerful force in Quebec — if not for sovereignty, then at least for the brand of nationalism being advocated by Premier François Legault.

Bloc Leader Yves-François Blanchet — who earned the nickname "goon" for his no-holds-barred approach to politics when he was a member of the provincial Parti Québécois — could prove a significant opponent.

Blanchet can be expected to argue forcefully for Legault's demands that Quebec be given more power over immigration and a single tax return managed by the province, and that Ottawa stay out of any efforts to overturn the province's controversial secularism law. Each of those demands will be difficult for the Liberals to swallow.

Many divisions

There is no escaping the fact that this is a country divided. Trudeau couldn't ignore it even in his victory speech, which directly addressed voters in the Prairies and Quebec; Trudeau assured them he had heard their message, without suggesting how it might influence his decisions.

But it's not only a regional divide. The Liberals' support is overwhelmingly in urban centres and their suburbs. For the Liberals, winning this election was hard — but governing might turn out to be harder.

First, Trudeau will have to pay more attention to his own caucus than he and his senior staff did over the past four years. Backbench MPs have little or no leverage in a majority. They have far more power when the fate of the government hangs on each and every confidence vote.

Liberal Leader Justin Trudeau speaks to supporters after his party wins a minority government. 11:15

The other big challenge facing the Liberals is to decide how to face the Commons going forward.

'On notice'

Some prime ministers have been very successful at negotiating support on an issue-by-issue basis. It worked for Stephen Harper in the 2006-2011 period — but at the time, he was benefiting from disarray in the Liberal Party.

Trudeau doesn't appear to enjoy a similar advantage. Scheer may well face some Conservative criticism for his own uneven performance in this campaign — but in his concession speech, he issued a clear warning.

"Tonight, Conservatives have put Justin Trudeau on notice," he said. "And Mr. Trudeau, when your government falls, Conservatives will be ready and we will win."

Conservative Leader Andrew Scheer says he's looking forward to heading back to Ottawa with a bigger Conservative team while speaking to reporters in Regina, Sask. 1:29

New Democrats hold the balance of power. Jagmeet Singh spoke to Trudeau last night but didn't divulge what they talked about.

But Singh set out what he called six urgent priorities during the campaign — things his party wants the next government to tackle.

Singh's demands

Topping the list are a single-payer, universal pharmacare program and more ambitious carbon emissions reduction targets. So far, the Liberals haven't committed to anything (there is more common ground between the two parties on the need to build affordable housing).

One hurdle to co-operation between the Liberals and New Democrats may be insurmountable. Both the NDP and Greens are adamantly opposed to the expansion of the Trans-Mountain Pipeline. Will that be part of the price for Singh's co-operation?

"These are the priorities of people that New Democrats will put at the heart of the conversations that we are going to have in the days and weeks to come," Singh told supporters in Burnaby. "And if the other parties work with us, we have an incredible opportunity to make the lives of all Canadians so much better."

NDP Leader Jagmeet Singh speaks to supporters in Burnaby at the end of the 2019 federal election. 24:40

It's not clear when Trudeau and Singh will talk, or what the prime minister will offer in return for NDP support as he pursues his next agenda in a divided Parliament and a divided country.

Minority governments can produce big things in Canada. Under Lester B. Pearson in the 1960s, the Liberals worked with the New Democrats to introduce medicare and the Canada Pension Plan.

Stephen Harper's Conservatives formed two minority governments and, at the insistence of his finance minister Jim Flaherty, embarked on a massive program of stimulus spending and tax cuts that took Canada through a global recession and allowed this country to emerge more quickly and in better shape from the downturn than other advanced economies.

It's possible climate change and universal pharmacare might be the issues that get this new minority government to introduce some lasting initiatives.

For now, common ground remains elusive. And nothing any of the leaders said in the wee hours of this morning suggests unity is high on their list of priorities.