CALGARY -- The Alberta Energy Regulator has forced Murphy Oil to shut heavy oil wells in northwestern Alberta because the company didn't meet the rules for properly handling gases.

In an unannounced compliance sweep of 71 sites last month, the regulator found 16 Murphy wells weren't meeting a requirement to capture and flare, incinerate, or conserve all casing gas and tank-top gases according to a schedule set out by the company.

Following that, the AER ordered Arkansas-based Murphy to conduct further inspections, and the company found another 17 sites that were venting gas.

Of the 33 total affected wells, 17 have had production cut off entirely, while the rest only had specific components ordered shut, said AER spokeswoman Melanie Veriotes.

"Albertans expect the AER to protect public safety and the environment and to make sure operators follow the rules," said AER president and CEO Jim Ellis in a release.

"The AER is committed to continued action in Peace River and ensuring all our requirements are met. When they are not, we will take enforcement action as we have demonstrated with these recent compliance sweeps."

In June 2014, following odour complaints in nearby communities, operators in the Seal Lake and Walrus areas submitted plans to the AER to capture tank-top gases in order to improve air quality.

Craig Popoff, general manager of regulatory affairs at Murphy Oil, said the company is assessing the situation. Its Calgary offices were closed on Friday afternoon, when the AER issued its release.

The AER is investigating the issue. The Murphy Oil sites will remain shut or partially shut until the regulator approves Murphy's plans to comply with the rules.

Since June of last year, the AER has done six compliance sweeps in the Peace River area, inspecting 834 sites. That's on top of regular inspections.

Separately, the AER continues to investigate a petroleum leak from a Murphy Oil pipeline in the same general area that took place in March.

In that event, up to 17,000 barrels of condensate -- used to make heavy oil thin enough to flow through pipelines -- spilled into muskeg.