The Ontario government passed legislation Thursday to prevent a strike or lockout at a utility that generates roughly half of the province's power, saying it could not risk letting labour action disrupt the electricity supply.

Legislators were called back from the holiday break on Monday in an effort to end the labour dispute between the Power Workers' Union and Ontario Power Generation.

The Progressive Conservatives said their bill will send the matter to arbitration so it can be resolved after months of deadlock between the two sides.

Its passage "removes the risk of widespread power outages and allows a dispute resolution to happen appropriately," Energy Minister Greg Rickford and Labour Minister Laurie Scott said in a statement.

"The people of Ontario can be assured this holiday season that they will have the power they need to light up and heat their homes and businesses."

The Opposition accused the Tories of fear-mongering for immediately turning to back-to-work legislation when there were less drastic options available.

Some Liberals as well as Green party Leader Mike Schreiner voted in favour of the bill, though both parties said they disapproved of the way the Tories handled the situation.

Schreiner said the government was trying to have it both ways by preventing the power workers from striking but stopping short of declaring them an essential service.

He said the government should make power workers essential if having them walk off the job automatically jeopardizes the province's electricity system.

The union, meanwhile, has said it is disappointed with the government's decision, which it says undermines bargaining efforts.

The labour group, which represents about 6,000 OPG employees and another 10,000 energy sector staff, has been without a collective bargaining agreement since March 31.