CALGARY - The Tories managed to hang onto one of their handful of seats in the provincial legislature in a byelection Tuesday that some observers described as a barometer of whether the party is still a force in Alberta politics.

It was a nail-biter of a night, with the race at times too close to call. But a short time before all 67 polls were reported, the Wildrose's Devinder Toor, a local businessman, conceded defeat to PC candidate Prab Gill, a real-estate appraiser, who won by a 335-vote margin.

Gill celebrated his victory with about 10 minutes of Bollywood dancing on stage as his jubilant supporters cheered him on.

"The PCs are back, baby!" he told them. "This is an incredible night for us. This is huge."

The bad news for the ruling NDP government was that their candidate, Roop Rai, a former radio host and producer, ended the night in fourth place behind the Liberal, property developer Khalil Karbani.

Calgary Greenway became vacant last November when Conservative legislature member Manmeet Bhullar was killed in a highway crash after he stopped to help a stranded motorist.

Bhullar was one of only 10 PCs who were left after Rachel Notley and the NDP won a majority in last May's election and ended more than four straight decades of Conservative governments. He had held the seat since first being elected in 2008.

"I knew we had enough to win this and carry on the work of our dear friend Manmeet," Gill said Tuesday, adding the support of Bhullar's family was crucial to his victory. "What I hope this win does is help us heal."

In a statement, Ric McIver, the interim leader of the Progressive Conservatives, congratulated Gill and welcomed him to caucus: "I am so pleased to know that ... Manmeet Bhullar's legacy of dedicated community service will live on."

Tuesday's result won't change the balance of power in the legislature.

Before the vote, the NDP had 54 of the 87 seats, the Wildrose party had 22 and the Tories had eight. The Liberals and the Alberta Party had one each.

Some political observers had suggested the byelection was a crucial one for the Tories.

"It would be devastating if they didn't hold on to something like this," said Melanee Thomas, a political scientist with the University of Calgary, before the vote. "If they can't hold seats that they have always held in Calgary, they've got some issues to work on."

Since Notley's sweep to power, the Tories have yet to pick a new leader and have faced pressure from some circles to unite with Brian Jean's right-of-centre Wildrose party.

The last leader, Jim Prentice, quit as his party went down to defeat on election night. The Tories lost Prentice's Calgary Foothills seat, a longtime stronghold, to the Wildrose in a byelection last September.

Political scientist Duane Bratt had suggested Tuesday's byelection held wide-ranging ramifications for Conservative fortunes.

"This is really about the PCs and whether they can hold it," said Bratt, who is with Mount Royal University in Calgary. "If the PCs win, they're going to be able to say, justifiably, 'We're not dead yet' and that there's a problem with Wildrose and their ability to win in the cities."

Rai, who actually delivered her concession speech before slipping to fourth place in the results, was upbeat before her cheering supporters, Premier Rachel Notley and a number of provincial cabinet ministers and MLAs.

She declined to speculate on what was behind the results.

"The voters spoke. I'm just going to leave it at that," she said.

Deputy premier Sarah Hoffman acknowledged times are tough in Alberta with the collapse in oil prices, and suggested the loss be kept in perspective.

"I know it's not unusual for governments to lose byelections," she said. "Clearly that's happened a number of times in the past, not just in Alberta but a number of other provinces.

"It's a way to send a message without risking a change in government, so I respect the fact that the voters made a different decision tonight."

The other candidates were Thana Boonlert of the Green party and Independents Larry Heather, Sukhi Rai and Said Abdulbaki. The Alberta Party did not field a candidate.