TORONTO -- Ontario's opposition parties scored victories in two byelections tonight, with the New Democrats taking Niagara Falls from the Liberals and the Progressive Conservatives holding the Thornhill riding, north of Toronto.

New Democrat Wayne Gates, a Niagara Falls city councillor, defeated former Progressive Conservative MPP Bart Maves while the Liberals came in a distant third in a riding they'd held for the past decade.

The Liberals put up a closer fight in Thornhill, but optometrist Gila Martow held the riding for the Progressive Conservatives in what many considered a must-win battle for Leader Tim Hudak.

Premier Kathleen Wynne had downplayed Liberal chances ahead of the votes, calling byelections "unique creatures" that allow people to safely lodge a protest against the government.

Wynne said she'll still be premier Friday morning and leading a minority Liberal government, regardless of the outcomes of the votes.

The byelections were widely seen as a chance to test voter intentions, and party messages, in advance of a general election that could come as early as this spring.