MONTREAL — Justin Trudeau's Liberals retained most of their seats in Quebec on their way to a minority victory, even as the Bloc Quebecois roared its way back to relevance.

Early Tuesday morning, the Liberals were elected or leading in 35 of the province's 78 ridings, compared with 32 for the Bloc, 10 for the Conservatives and one for the NDP.

In 2015, Trudeau's Liberals sailed to their best showing in the province in decades as they won 40 of the province's 78 ridings, capturing more than 35 per cent of the popular vote.

While the Liberals' seat count declined slightly, most of the party's star candidates survived unscathed despite polls that had showed some of them running in close races. They captured about 34 per cent of the popular vote in the province, compared with 33 per cent for the Bloc, 16 per cent for the Conservatives and 11 per cent for the NDP.

Quebec cabinet ministers Marc Garneau, Melanie Joly, Francois-Philippe Champagne, David Lametti, Marie-Claude Bibeau, Pablo Rodriguez and Jean-Yves Duclos were all re-elected, while much-touted environmentalist Steven Guilbeault captured the formerly NDP-held Montreal riding of Laurier-Sainte-Marie.

Federal revenue minister Diane Lebouthillier was still not declared elected as of 1:30 a.m., despite holding a 600-vote lead over a Bloc challenger in Gaspesie-Iles-de-la-Madeleine.

In his acceptance speech, Trudeau spoke to the province's voters and promised to carry their concerns to Ottawa.

"I give you my word, and my team and I will be there for you," he said in French, to thunderous applause. He also thanked the people in his riding of Papineau, who re-elected him with more than 50 per cent of the vote.

The Conservative seat count declined to 10 from 11, but the party maintained its support in and around Quebec City, the party's traditional bastion of support in the province. Richard Lehoux, the former president of the Quebec federation of municipalities, knocked off People's Party of Canada Leader Maxime Bernier in Beauce, while Scheer's Quebec lieutenant, Alain Rayes, was re-elected in Richmond--Arthabaska.

It was a night of crushing disappointment for the New Democrats, who were elected or leading in just one riding in the province. Even popular MP Ruth Ellen Brosseau, a symbol of the so-called "orange wave" that led the party to official opposition status in 2011, was defeated in her Berthier-Maskinonge riding.

Leader Jagmeet Singh acknowledged in a speech from B.C. that the results in the province were "not what we wanted," but said he would continue to work to unite progressive voters in Quebec and across the country.

But in many ways the night belonged to the Bloc Quebecois, which more than tripled its seat count from four years ago, only a year after an internal crisis that saw seven of the party's 10 MPs quit amid an internal crisis.

Bloc Quebecois leader Yves-Francois Blanchet won his riding, and the party captured ridings in Quebec's north and a vast swath of seats to the north and east of Montreal.

Blanchet, who had expressed a desire for a minority parliament, promised to work with the other parties -- as long as what they proposed was good for Quebec.

Blanchet's speech was punctuated at times by cheers from the crowd, who chanted "We want a country!"

"Me too," he responded, but he told his fellow sovereigntists their dreams of independence would have to wait. "For this time, the realization of sovereignty is not in our mandate," he said.

All major federal party leaders campaigned heavily in Quebec, which has been a kingmaker in the past because of its high seat count and a fickle electorate that tends to vote as a bloc.

The Liberals lobbied for a second mandate for Trudeau, who argued Quebecers would be best-served by being included at the decision-making table in a government that shares the province's progressive values.

But the Bloc steadily climbed in the polls throughout the campaign, propelled by the renewed sense of nationalism that led Premier Francois Legault's Coalition Avenir Quebec government to a majority in 2018. Blanchet insisted he's the only one who will meet all of Legault's demands and put Quebec's interests ahead of other provinces'.

The Liberals held 40 seats at dissolution, while the NDP held 14, the Conservatives 11, and the Bloc 10. There was one Independent, one vacancy and Bernier held the seat of Beauce.