HAMILTON, Ont. - An energetic, positive campaign led by a charismatic Andrea Horwath helped the New Democrats nearly double their seats in a hard-fought election Thursday night.

The NDP leader wasted no time in letting the minority Liberals know that she expected the parties to work together.

"I'm prepared to roll up my sleeves and I'm prepared to, in a very respectful way, make sure that we're delivering for Ontarians," Horwath said.

"I'm hoping that the other two leaders are on the same page that I am in starting that process sooner rather than later, because there's a lot of work to do."

Even though the party placed third, a jubilant Horwath greeted and hugged supporters after the results were announced in what sounded and looked like a victory party. The happy crowd at the Hamilton Convention Centre roared every time a New Democrat was elected, with the excitement growing as the night wore on.

The party retained its 10 seats and gained seven others, several in the north and in Hamilton, but also made some inroads by winning a riding in the Greater Toronto Area.

"We promised to work to build a better Ontario and we will keep that promise," an elated Horwath told her cheering supporters.

While Horwath's performance during the campaign likely exceeded her team's expectations, experts said her true test will come in how well she's able to negotiate with the minority government to get her priorities across.

"She's been underestimated all her career," said Henry Jacek, a politics professor at McMaster University. "The other two parties have to worry about her -- she has an incredible ability to get people on her side and that can really snowball."

Bob Drummond of York University said the legislature was likely to return in a few weeks, with the Liberals forced to govern as a minority government, even though they fell short of the magic number 54 by just one seat.

And while Premier Dalton McGuinty was clear during the campaign that he wasn't interested in any kind of coalition, Drummond said he was going to have to work with the other parties.

"They're probably going to do it on an issue-by-issue basis," he said.

Analysts agree that the NDP ran a good campaign and attributed much of the party's success to Horwath and her witty, breezy style.

The NDP received an additional boost this May when their federal cousins gained a record 103 seats in Parliament in the general election. Some also predicted the outpouring of support for late federal leader Jack Layton could also have a trickle-down effect for the provincial party.

Layton's son, Mike Layton, said Horwath ran the kind of positive campaign his father would have approved of.

"She brought ideas to the table," he said. "She didn't campaign on fear or scare tactics."

Horwath, 48, the middle of four children, grew up listening to her late father Andrew Horwath talk about his union at Ford. Their conversations about labour negotiations and strikes helped foster her interest in social justice.

Every year, the family would attend the union picnic, and the younger Horwath would read the newsletters sent to their home.

Her sister, Susanne Benvenuti, said there was a special bond between Andrea and their father because of their shared interests, noting that the younger Horwath "always understood him a little bit more in that sense, because he was passionate about unions and work."

Horwath's political career began in 1997 at Hamilton city council, where she served three terms. Before that she spent several years working with the Hamilton labour movement, literacy programs and as an organizer of Hamilton's Days of Action campaign against cutbacks by Mike Harris's Tory government.

She decided to get into politics when, in the midst of municipal downloading, she and her colleagues decided like-minded people were needed on city council. During her time at city hall, she was a strong voice for the left and earned a reputation as someone who could hold her own but also had a knack for bringing people together to achieve results.

Horwath was asked to run provincially in 2003 by then-NDP leader Howard Hampton. She turned down the chance because her father had been diagnosed with terminal lung cancer.

"It (would have been) a whole new ball game ... and I knew that if I ended up winning, it would take me too far away from my family at a time when I needed to be with my dad," Horwath has said.

Andrew Horwath died in January of 2004, and two months later Liberal Dominic Agostino, who held the riding of Hamilton East, also passed away. When that byelection was called, Horwath decided this time she would get in the ring.

Her byelection win in 2004 restored the NDP to official party status, and Horwath won the leadership five years later amid excitement about her youth, energy and promises to rebuild the struggling party.

Horwath has worked to put forward a practical platform that appeals to all Ontario residents while still engaging its left-of-centre base, a difficult balancing act observers said was her best bet to win more seats.

But some worried about policies they considered protectionist, such as Horwath's Buy Ontario plan, or ones critics said would kill jobs, such as a plan to raise corporate taxes.

For a rookie leader, she made few mistakes throughout the campaign, and none that received as much of a backlash as Progressive Conservative Leader Tim Hudak did when he called professional immigrants "foreign workers" or when he stood by a party flyer the Liberals deemed homophobic.

Still, Horwath did draw the ire of hospital workers in her hometown when she singled them out during the leaders' televised debate by criticizing her son's treatment at Hamilton General Hospital.

Eighteen-year-old Julian Leonetti went to the emergency room after a skateboarding accident, Horwath said, and "they didn't do anything for his fractured elbow."

She later softened her tone, saying her son did receive an X-ray and explaining the example was just meant to "illustrate people are disappointed with the service they're getting at the hospitals."

She also clarified that she didn't blame the hospitals -- just the Liberal government, which is not focusing on patient care.

Horwath also had to reign in some candidates after veteran New Democrat Michael Prue's campaign used an auto-dialling system to call voters in his Toronto riding of Beaches-East York, saying the party was going through a rough patch since Layton's death in August. Dan Harris, the NDP MP for Scarborough-Southwest, used the same pitch in his efforts to help candidate Bruce Budd.

One of Horwath's biggest successes was perhaps her ability to distance herself from the unpopular early '90s tenure of NDP premier Bob Rae, now interim leader for the federal Liberals.

Rae's defection to the Liberals and the passage of time have helped to banish his ghost, said Jacek. During the leaders' debate, Horwath's "masterful, breezy" retort that Rae is now Premier Dalton McGuinty's federal leader was enough to give him a final kick out the door, Jacek added.

Still, it appeared the party remained a bit jittery around its former leader, quickly switching networks at the party's headquarters on election night when Rae came on TV as a commentator.

Ontario's last minority government was 26 years ago, when Rae signed a deal with David Peterson's Liberals to topple the minority Tory government and make Peterson premier. In exchange, the Liberals agreed to pass certain pieces of legislation for the NDP, and Rae curried a lot of favour when he was able to successfully negotiate with the Liberals on issues that mattered to his party.