TORONTO - An Ontario court has upheld changes to Ontario's Endangered Species Act that environmental groups say threaten the animals and plants the law is meant to protect.

The Liberal government changed the endangered species regulation in 2013 to exempt some industries such as forestry, oil and gas, and mining from a prohibition against harming at-risk species or destroying their habitats.

Ontario Nature and Wildlands League argued in Divisional Court that the exemptions remove the law's core protections for almost all of Ontario's 155 endangered and threatened species.

Lawyers for the government argued that exemptions can only apply when a proponent meets a number of onerous conditions.

The court upheld the regulation, saying it balances protecting at-risk species with the economics of the industries that operate under the Endangered Species Act.

The environmental groups say the act is intended to put species first, "not to let their survival be balanced against competing industrial interests."