A New Democratic Party bill to slash the salaries of Ontario's highest-paid civil servants was defeated in the legislature Thursday afternoon.

The proposal, which would have capped public sector pay at $418,000 – double the salary of Premier Kathleen Wynne – was voted down by an 18 to 39 margin. The governing Liberals and official opposition Progressive Conservatives both opposed the bill.

The legislation was largely symbolic. It would only have saved about $18-million to $20-million – a relatively small sum compared to the province's massive budget.

Story continues below advertisement

"Eighteen million to $20-million annually isn't going to fix the deficit of Ontario, but it's a small step in the right direction," NDP Leader Andrea Horwath conceded the day before the vote. "We have to start somewhere … frankly, the example gets set at the top."

The Liberals suggested they might be in favour of doing more to control public-sector pay, but that they were still studying the matter.

"The NDP supported the 2013 Budget that committed to examining additional measures to manage compensation costs, including considering hard caps. That examination is underway and we will implement new measures in the coming months," Government House Leader John Milloy said in a statement.

The Progressive Conservatives, meanwhile, favour a wage freeze for all public-sector workers – a much farther-reaching measure that it estimates would save billions of dollars.

According to the NDP's count, 180 civil servants made double the Premier's salary in 2012. The best-compensated include the heads of hospitals and the CEO of Ontario Power Generation, which runs most of the province's electrical plants.

Ms. Horwath said her legislation would allow for exceptions to be made in cases of public servants with highly specialized skills, such as nuclear physicists.