TORONTO -- The union representing Ontario's public high-school teachers says talks with the government that explored the possibility of extending their contracts have ended with no agreement.

A contract extension could have ensured no contentious bargaining in the lead-up to the 2018 election.

But Paul Elliott, president of the Ontario Secondary School Teachers' Federation, says those "exploratory" talks ended Wednesday without an agreement.

He says he won't rule out a possible extension in the future, but for now it is off the table.

The issue arose as part of government discussions with education-sector unions over a court ruling earlier this year that said the government violated their collective bargaining rights.

Legislation in 2012, known as Bill 115, imposed contracts on teachers that froze some of their wages and limited their ability to strike, so five unions took the government to court. The judge sided with them, but left the question of a remedy up to the government and unions to decide.

No agreement could be reached on that remedy, so the issue will now go back to the judge, Elliott said.

Teacher and education-worker contracts currently expire Aug. 31, 2017 and bargaining for the next deals had been likely to start in the spring, about a year before the next provincial election is expected.

The last set of teacher and education worker contracts expired in 2014 and what followed was an unusually long round of talks due to the new legislation. The length of bargaining led to controversy for the Liberal government, after it was revealed that three unions were promised $2.5 million to cover their negotiation costs.