The Liberals have once more won the most seats in the House of Commons, but this time they do not have an outright majority. So what happens next?
With fewer than the 170 seats needed to command the House on their own, Justin Trudeau will need the support of at least one other party to pass legislation in Parliament — and survive a confidence vote on a speech from the throne laying out his plans for governing.
Before then, Trudeau will have to deal with some of the implications of Monday's results.
Trudeau is still the prime minister and Canada is technically still in the same "ministry" — essentially, the same cabinet or administration — as before the election.
However, the first decision Trudeau makes will likely be to reshuffle his cabinet, considering Public Safety Minister Ralph Goodale and Natural Resources Minister Amarjeet Sohi lost their seats.
Trudeau's next decisions will be to set a time for Parliament to reconvene. Technically, the Governor General summons a new Parliament, but does so on the advice of the prime minister.
The timing of reconvening the House has varied throughout Canadian history. In 2015, it took over a month for MPs to be called back to Ottawa, though a new cabinet was sworn in far earlier than that. Given that there is less dramatic change than in that year, it's possible we may see Parliament return sooner.
When the new Parliament sits, its very first order of business will be the election of a Speaker. Geoff Regan, the current Speaker, was re-elected to his Halifax-area seat Monday but isn't automatically returned to the position.
The longest-serving MP in the House will preside over that election. Louis Plamondon, a Bloc MP, will oversee the proceedings for the fourth time — Plamondon has held his Quebec seat since 1984 and was comfortably re-elected.
And it's after the election of the Speaker that the main event begins, with a speech from the throne. In the speech, the government will lay out its priorities and hint at what direction it will take in the new Parliament.
The speech from the throne is also the first opportunity for opposition parties to try to bring down the government in a confidence challenge. Since the Liberals have less than a majority of seats, they will need to make sure they can secure at least 170 votes to keep the confidence of the House and their grip on power.
Trudeau has a few options. For one, he might bet that no party will want to bring down the government and potentially force another election — or otherwise give the Conservatives the opportunity to form government.
In that case, Trudeau would not make any agreements with the opposition parties, bet that he would survive a potential confidence vote anyway, and from there see if he could secure support on an issue-to-issue basis.
But if he wants a more stable situation, Trudeau could make a more formal deal with another party to secure its support on confidence matters, an arrangement dubbed a "confidence and supply" agreement.
Such an deal is in place in British Columbia, where the NDP are in government and maintain a parliamentary majority thanks to support from the provincial Greens.
At the federal level, the most likely partner for such an agreement would be the NDP under Jagmeet Singh. During the campaign, Singh laid out six priorities for supporting another party in a minority, including pharmacare, investments in housing and action on climate change.
In exchange for maintaining the minority government, the NDP would expect to influence government policy on these files.
It's possible that the Liberals could form a formal coalition with another party — in which members of the other party serve in cabinet — to maintain a majority, though this is unlikely.
The Bloc also has enough seats to sustain a Liberal government if it chooses to do so.
However they get there, the goal of the Liberals will be to make sure they have at least 170 votes for confidence challenges and pieces of major legislation.
Whether Trudeau wants to cut a deal with another party or take it vote by vote is up to him.
Christian Paas-Lang, The Canadian Press