TORONTO -- Teachers who went on illegal strikes earlier this year will be allowed to make pension contributions for that period of time but the same agreement won't apply to future illegal job actions, Ontario's education minister said Monday.

Public secondary school teachers in three boards went on strike this spring but are being exempted from a rule that prohibits pension payments during illegal job action, Liz Sandals said Monday.

The government didn't want to penalize the teachers since their union, the Ontario Secondary School Teachers' Federation, led them to believe the strike was legal, though it was later found to be illegal by the Ontario Labour Relations Board, she said.

"I had a lot of sympathy with the members who thought they were on a legal strike, then who found out at the end of it that they were on an illegal strike," Sandals said. "The individual teachers didn't say, 'I'm going to go on an illegal strike."'

The agreement, first reported by the Globe and Mail, with high school teachers in the Peel, Durham and Sudbury-area regions treats their strikes as legal ones under the pension contribution rules. It's "extraordinarily specific" and even if other unions try to get similar exemptions in the future, it won't apply in any other circumstance, Sandals said.

"Quite frankly, unions present you with all sorts of creative interpretations of virtually every rule ever known to mankind and it's the government's job or the board's job, as the case may be, to say no," she said.

The government still doesn't make contributions for the strike period, but the agreement allows the teachers or their unions to make contributions. Normally they are not allowed during an illegal strike.

OSSTF did not respond to a request for comment.

Teachers in the three boards were on strike for several weeks in the spring until the labour board ruled the three local strikes were at least in part over the central issue of class sizes and therefore illegal.

The strikes occurred during the first round of negotiations to formally separate local and central bargaining under legislation the Liberal government brought in last year.

Lawyers for the three school boards argued that although the law doesn't explicitly ban teachers from staging local strikes on provincial issues, that's what it was meant to do, and the board agreed.