MONTREAL -- The Parti Quebecois celebrated a return to power after nine years in opposition but its parade was dampened Tuesday by a weaker-than-desired result that could severely limit its ability to pursue its independence agenda.

The party has never governed with a minority in its history and, therefore, has never faced the need to table a referendum question, an inaugural speech, or any other confidence measure with the support of parties that oppose its core values.

Its score in the popular vote was also mediocre. The PQ took about 32 per cent of votes. That was just one percentage point more than the governing Liberals, who staved off the electoral annihilation many had predicted. The new Coalition party had 27 per cent.

The result was greeted with perhaps the greatest sigh of relief, ever, to follow any of the five elections the PQ has now won in its history. In an early reaction from federal politicians, Liberal Leader Bob Rae bluntly described the result on Twitter as: "Quebec voters reject separatist project."

Prime Minister Stephen Harper was more conciliatory but the message was similar. In a statement he congratulated the PQ's Pauline Marois on her election win -- then delivered a pointed barb aimed at the independence project.

"We don't believe Quebecers want to reopen the old constitutional quarrels of the past," Harper said in his first public comments after five weeks of silence on the Quebec election.

"Our government will remain focused on jobs, economic growth and good economic management. We believe economic issues and jobs are also the priority of Quebecers. In that sense, we will continue working with the Government of Quebec on those common objectives."

Harper also thanked outgoing premier Jean Charest for his "leadership and devotion to Quebecers."

Charest's status was a major wildcard late Tuesday. Charest lost his riding of Sherbrooke, for the first time in nine federal and provincial elections -- and it's unknown whether he will stay on to lead his party, or how his party would vote in the legislature without a leader there.

The PQ won or was leading in about 56 ridings in Tuesday's election, shy of the 63 needed for a majority in the 125-seat legislature. Quebec solidaire won two seats.

Charest's Liberals had a far better-than-expected result and were leading or elected in about 48 ridings, holding onto official Opposition status. The newly formed Coalition party had a disappointing night, winning or leading in about 19 ridings.

Among party leaders, Marois was easily elected in her riding and was set to become the fifth female provincial or territorial premier. The Coalition's Francois Legault held a narrow lead, and Quebec solidaire's two co-leaders, Amir Khadir and Francoise David, were elected.

While predictions of the Liberals' electoral wipeout did not come true the party is not out of the woods yet: in addition to being potentially leaderless, the inner workings of its fundraising will be exposed to public scrutiny in an ongoing public inquiry.

Several factors could also resurrect the independence program.

It appeared unlikely, although not impossible, that the final seat numbers would ultimately leave another pro-independence party, the smaller and more left-wing Quebec solidaire, with the balance of power. It was also unclear whether the PQ might try to poach a few floor-crossers to get a majority.

There was a surge in voter turnout from 2008 levels.

A PQ win in the seat count terminates the reign of Charest, the resolutely pro-Canada premier who made the transition from national politics in 1998 when the federalist forces in the province were leaderless and fearful of another sovereignty referendum.

Charest's Liberals had won the popular vote in every provincial campaign he led and, since 2003, had held power with three straight election victories. They came close to winning the popular vote again, bolstered by their strength in anglophone areas.

The Charest years saw his government occasionally clash with Ottawa over policies related to criminal justice, the environment and health transfers but those skirmishes had generally been brief and sporadic.

The party that won the most seats Tuesday was the one that was consistently pushed him to take a harder line against Ottawa, and that frequently accused him of sacrificing Quebec's interests for fear of creating a schism with Canada.

The PQ would have no such qualms about schisms. The idea of confrontation with Ottawa is a central theme built into its platform.

The party plans to either demand or create new provincial powers, including a "Quebec citizenship." To get that document, future immigrants would have to prove they speak French, and the document would be a requirement to run for public office.

The party would also demand a transfer of powers from Ottawa that touch on domestic and international affairs. Targets include employment insurance, copyright policy and foreign-assistance funding.

Throughout the campaign the PQ has warned that should the Supreme Court get in the way of any new language laws, or should Ottawa say no to any request, it has a backup plan: using each defeat as kindling to stoke the embers of the independence movement.

But it may ultimately be the national assembly of Quebec that thwarts many of its plans, given the vote results.

In any case, support for independence hasn't traditionally reached its highest peaks because of actions by a PQ government -- but because of outside events.

Two examples are the early 1990s, when an attempt to get Quebec constitutionally recognized as a "distinct society" failed, and in 2004 at the height of the sponsorship scandal.

A recent survey suggested the PQ had its work cut out for it with respect to its raison d'etre. The CROP survey pegged support for sovereignty at an especially dismal 28 per cent, or roughly half the historic levels recorded in the early '90s.

Charest was an underdog when he called the election but he entered into it at a moment many considered the most hospitable timing for his party.

The province's corruption inquiry is off during its summer holiday -- and the return to school is on.

That timing might have helped push to the background ethics scandals that dogged his government such as the minister, Tony Tomassi, who quit politics and is set to appear in court on fraud charges.

Charest wanted to talk about law and order of another kind -- in other words, not yielding to student protesters.

Just over a month ago, Charest kicked off the election campaign with an appeal to what he called "the silent majority," meaning those voters who opposed last spring's protests and who might be eager to punish the PQ for supporting them.

But the protests died down during the campaign. Most students have gone back to class, and only a few holdout university faculties and the most ardent protesters have kept up the fight.

So the battle over tuition never wound up taking centre stage. Charest was dogged by protests, however, during the campaign and was followed again by a jeering crowd when he cast his ballot Tuesday.

The student protesters rubbed a bit of salt in the wound late Tuesday, with one of their former leaders, Leo Bureau-Blouin, becoming the youngest-ever member of the legislature when he won a Montreal-area seat for the PQ.

Bureau-Blouin turns 21 in December.