John Fraser was able to retain the riding of Ottawa South for the Ontario Liberal Party, beating his closest competitor Matt Young of the Progressive Conservatives.

The riding was previously held by former Ontario premier and Fraser's former boss, Dalton McGuinty.

Fraser won with 14,925 votes to Young's 13,631.

The CBC Decision Desk ruled that Fraser won the riding at 10:44 p.m.

The Liberals also took the riding of Scarborough-Guildwood. The NDP won two seats: Windsor-Tecumseh and London West. The PCs took Etobicoke-Lakeshore.

The make up of Ontario legislature after Thursday night's election is 20 seats for the NDP, 37 seats for the PCs and 50 for the ruling Liberal party.

WATCH

Ottawa South was expected to be one of the tightest races among the five Ontario byelections this summer and the four-week sprint lived up to its billing. But it was a surprise to many that Fraser managed to stay ahead of his PC opponent Matt Young all night as the poll results rolled in.

Fraser, who spent 14 years as a constituency assistant for McGuinty, was running to become an MPP for the first time. He focused on foot traffic, knocking on as many doors as possible. It was also a mission for him to separate himself from his predecessor.

A married father of three grown children, Fraser spent 18 years managing small and medium-sized local businesses before he entered public service.

He celebrated the win at the Kelsey’s Restaurant at South Keys Shopping Centre on Bank Street Thursday night.

In his victory speech, Fraser said voters chose "strong, compassionate leadership" and that was "what they're going to get." He also thanked his predecessor McGuinty for helping him win the seat.

Gas plant tactic for PC hopeful

Young, 34, ran a campaign based mostly around the recent gas plant scandal that has dogged the Ontario Liberals. That scandal also signalled the end for McGuinty who resigned from his seat in June after stepping down as premier.

Polls suggested Young was the frontrunner coming into Thursday night and many expected the PCs to take Ottawa South for the first time in almost three decades, but the loss was part of a disappointing night for the Tories.

Young did take solace in shrinking the gap between the Liberals and PCs this time around compared to the 2011 provincial election.

In that election, McGuinty won the seat by almost 7,000 votes.

NDP candidate Bronwyn Funiciello, the vice-chairwoman of the Ottawa-Carleton District School board of trustees, quickly fell off the pace after the early polls rolled in. Her party did well across the province, though, capturing two of the five seats.

According to the CBC Decision Desk, results for the four other byelections were:

Scarborough-Guildwood, win projected for Mitzie Hunter, Liberal.

Etobicoke-Lakeshore, win projected for Doug Holyday, PC.

Windsor-Tecumseh, win projected for Percy Hatfield, NDP.

London West, win projected for Peggy Sattler, NDP.

The Liberals will continue to run a minority government despite losing some coveted seats in southern Ontario, including one in Toronto to former Toronto deputy mayor Doug Holyday in Etobicoke-Lakeshore.