Liberal incumbent and cabinet minister Maryam Monsef won re-election to a second term in the Peterborough-Kawartha riding in Monday night's federal election, but by a narrower margin than in 2015.

"I love you Peterborough — thank you," Monsef said in her victory speech at Showplace Performance Centre.

She gave "a heartfelt thank you to the people of Peterborough-Kawartha.... Thank you for believing in me, thank you for putting your trust in me, thank you for all the ways we're going to make this community even stronger for the next four years."

She noted that while the Liberals had not been re-elected to a majority nationally, the party had the most seats. She claimed the Liberals had the highest proportion of the national vote, although the Conservatives actually had more votes nationally at 34.5 per cent compared to 33 per cent for the Liberals.

Yet she also called the election a "nailbiter" and said Canada was in some ways "a nation divided."

"Our goal over the next years must be to go beyond simply governing: It must be maintaining the grand consensus that defines Canada," she said. "Beyond any partisan victory tonight, our ability to find common purpose must be the outcome of this election."

Conservative challenger Michael Skinner thanked his campaign team for their hard work in his concession speech.

"Obviously this is the second speech that I didn't necessarily want to do, and the results aren't what all of us in this room hoped for," Skinner said.

His wife, Catia, cried and wiped away tears on stage.

"It was very, very close, obviously but close doesn't cut it in politics," Skinner said. "Ms. Monsef is going to have another term, which is great, and hopefully we'll all support her to make sure that she can continue leading this community… we know this community has some challenges, so we're going to need to support her to make sure these challenges are looked after."

The vote counting in the riding was much slower than normal, but there was no immediate word why.

With 281 of 283 polls counted, Monsef had 26,979 votes, or 39.2 per cent, compared to 24,096, or 35 per cent, for Skinner.

The Nexicom Studio at Showplace Performance Centre was packed with supporters all evening, and the cheers rose more and more often through the evening as the polls reported results showing Monsef ahead.

A hush fell over the room at one moment when Skinner pulled ahead by a very slim margin, but that was followed by many cheers as Monsef pulled ahead again.

Still, Monsef didn't give a victory speech before midnight since nearly 100 polls had still not reported results by that time, although Monsef maintained a comfortable lead.

It was a slimmer margin of victory than in 2015 when Monsef had 43.8 per cent of the vote with 29,159 votes to Skinner's 35.1 per cent of the vote with 23,335 votes.

New Democrat Candace Shaw ran a distant third with 11,698 votes, or 17.1 per cent of the vote.

"I'm really proud of the that campaign we ran and of our ideas and of Jagmeet Singh, our leader, and I'm really excited to take everybody on in the next election," Shaw said.

Green candidate Andrew MacGregor was fourth with 4,857 or 7.1 per cent.

"I am pleased that Peterborough has chosen a party that's recognizing the seriousness of the climate crisis," MacGregor said.

"Of course, I would have liked them to have chosen a party that would tackle it a little more strongly."

The People's Party of Canada candidate Alexander Murphy had just 876 votes, or 1.3 per cent.

"We're very proud of how we ran our campaign …we came into this campaign with reasonable expectations and we exceeded them and we're happy with the results," Murphy said.

Independent Robert M. Bowers had 176 votes, or 0.3 per cent.

"A minority government would be good for Monsef, she needs some challenges," Bowers said. "I think she's had it a little easy on herself."

Ken Ranney, co-founder of the Stop Climate Change party, had 172, or 0.3 per cent.

Loading... Loading... Loading... Loading... Loading... Loading...

"I'm disappointed there was not more discussion about climate change," Ranney said.

Monsef was declared the winner around 11:15 p.m.

Monsef has been the women and gender equality minister and minister of international development in Liberal leader Justin Trudeau's cabinet.

In a scrum following the victory speech, Monsef said she wasn't yet thinking about whether another cabinet post will be hers soon.

"I'm just so grateful that my No. 1 job remains my No. 1 job, and that is to be the MP for Peterborough-Kawartha," she said.

In her speech, Monsef was effusive in her thanks for campaign volunteers.

"Over 300 volunteers reached out to close to 100,000 people in this riding," she said. "Each and every single one of you have carried this victory tonight – this is our victory. This is our hard work. Every single vote matters – and you brought it home tonight."

In her speech Monsef also thanked her campaign manager Lauren Hunter and supporters such as former Liberal MPP and Agriculture Minister Jeff Leal, and Selwyn Mayor Andy Mitchell (once a Liberal MP and cabinet minister in former Prime Minister Paul Martin's government).

Monsef also thanked her mother, whom she described as a woman who has "slain more dragons in her lifetime than most of us can dream of. Mom, I love you."

Last week, both Monsef and Skinner were feeling optimistic about their chances.

Monsef held a rally for her campaign volunteers on Thursday and told them another win is within their grasp.

"I feel the momentum — I feel it!" she said. "Now let's go get it!"

But Skinner, a local entrepreneur, was feeling momentum too last week.

He said on Thursday his campaign has knocked on 45,000 doors.

"I'm very optimistic — we went out and did the hard work," Skinner said.

Meanwhile the advance polls were busier than they were at the 2015 federal election.

Elections Canada said this week that 17,352 votes were cast at the advance polls in Peterborough-Kawartha, which is 2,101 more than were cast in the advance polls in 2015.