Justin Trudeau defied worst expectations to keep his job as prime minister. His Liberals are again the largest party, but have lost their majority. Find out where the parties are strongest and who were the winners and losers on the night.

Prime minister Justin Trudeau’s Liberal party lost 20 seats, while its main opposition rivals the Conservatives gained 26. But the Liberals have retained enough seats to form a minority government. Meanwhile, the Bloc Québécois gained 22 seats and the leftwing New Democratic party lost 15. Turnout overall was down, at 62%, from 68% in 2015.

The Liberals’ narrow victory came despite their losing the popular vote. The Conservative vote was heavily concentrated in Saskatchewan and Alberta, and elsewhere did not convert into seats. The Liberals were heavily reliant for seats on Ontario, the populous province that includes Toronto and several other cities.

Seats by province

Winners and losers