TORONTO - Ontario's governing Liberals managed to hang on to a longtime Toronto seat Thursday, despite fierce attacks on the party's controversial tax harmonization plan and spending scandals at provincial agencies.

Dr. Eric Hoskins, a former adviser to Lloyd Axworthy, won the byelection in the midtown riding of St. Paul's which was held by former cabinet minister Michael Bryant for a decade before he left politics in June.

Premier Dalton McGuinty congratulated Hoskins on his victory around 10:12 p.m., before Elections Ontario released unofficial results from a majority of the polling stations.

"It takes courage to put your name on a ballot and campaign from door to door. And it also requires unswerving dedication to our democratic traditions and a belief in the value of public service," McGuinty said in a statement.

"Dr. Hoskins exemplifies that spirit. He was an excellent candidate who ran for all the right reasons, and I am certain he will be an equally excellent MPP."

The New Democrats and Progressive Conservatives focused their campaigns on the single sales tax, hoping to capitalize on voter anger about the higher costs the scheme will trigger next July on hundreds of everyday items, from coffee, to fast food and funerals.

But hopes for a protest vote that would dislodge the 10-year Liberal hold on the riding fizzled Thursday as residents elected instead to maintain the status quo.

In the days leading up to the byelection, Premier Dalton McGuinty acknowledged that while his HST plans could hurt his party at the ballot box, reaction would be tempered by his government's record in areas like education, health care and the economy.

Bryant triggered the race when he quit politics in June to become CEO of Invest Toronto.

The former attorney general resigned from Invest Toronto after a fatal collision involving a cyclist on Aug. 31. He faces two serious criminal charges but has said he is innocent of the accusations made against him.

Hoskins, a Rhodes scholar and doctor is perhaps best known as the co-founder of War Child Canada, a charity that helps children in war-torn countries.

He also ran in the 2007 federal election, but failed to unseat Conservative cabinet minister Diane Finley in the rural Ontario riding of Haldimand-Norfolk.

This time around, Hoskins beat out Progressive Conservative candidate Sue-Ann Levy, a feisty city hall columnist at the Toronto Sun, and NDP candidate and lawyer Julian Heller.

Experts had played down the importance of the byelection, saying the Liberals could easily shrug off a loss.

However, a win or tight second-place finish would have been a big boost for the Opposition Tories, who are keen to break into big cities like Toronto, said Bryan Evans, a politics professor at Toronto's Ryerson University.

The party has been shut out of the city and currently holds only two seats in the legislature that represent large, urban ridings.

Winning Toronto seats was a major achievement for the party under former premier Mike Harris, who produced two back-to-back majority governments in the 1990s with his right-wing "Common Sense Revolution" agenda.

Patrick Harris, Levy's campaign manager, blamed the Liberal's long-time stronghold on the riding for the loss as well as a summer campaign that led to low voter turnout.

"People are disillusioned with the government and when they're disillusioned they tend not to vote," Harris said.

Progressive Conservative Leader Tim Hudak took to the podium with Levy late Thursday night and described her as a "tenacious, feisty, hard-working and determined" candidate.

Levy said she would continue to hold Hoskins' "feet to the fire" as a journalist.

The Liberals collected a whopping $424,741 in reportable donations during the byelection campaign, while the Tories raised just $13,775, according to Elections Ontario.

The agency requires all parties to report donations over $100.

Labatt Breweries of Canada Ltd. gave the largest donation of $10,300 to the Liberals. Other contributions included $6,500 from Bruce Power L.P., which operates a southwestern Ontario nuclear power plant, $5,000 from Paul Martin and $250 from former Progressive Conservative cabinet minister Janet Ecker.

During the 2007 federal race, Hoskins managed to raise only $2,650 in contributions from 11 donors, according to the Elections Canada database. However, the federal rules for donating to a political party are far more strict than they are provincially.

St. Paul's has a population of 112,449 including 82,505 eligible voters. The riding which has at one time been Liberal, Conservative and NDP has a mixed-income population with some high-end neighbourhoods and some middle-class to low-income.

Bryant took the seat in 1999 by defeating Tory cabinet minister Isabel Bassett by 4,782 votes.

In the 2007 provincial election, Bryant beat out his closest opponent, Conservative candidate Lillyann Goldstein, by 9,370 votes.