NEWMARKET, Ont. -- Outrage erupted on social media Monday after police shot a black bear in a suburban backyard just north of Toronto.

People took to Twitter and other platforms to decry the bear's death as unnecessary and criticize police for not trying to subdue the animal first.

But York Regional Police said they had no choice but to shoot the bear after it was cornered in a backyard in Newmarket, Ont., early Monday.

"Bear began coming down from a tree and became a risk to people in the area. Officers have shot the bear due to having no other options," the force tweeted shortly after the incident.

"Officers do not have tranquilizers or other options for dealing with wildlife. We could not let the bear harm a person while waiting for MNR (Ministry of Natural Resources)."

Police previously said they were waiting for ministry staff to contain the animal.

A supervisor with the ministry said staff mobilized as quickly as they could after being called around 6:20 a.m. but the animal was already dead when they arrived.

John Almond said the bear couldn't be tranquilized until it was stationary.

"Unfortunately, the bear decided it was going to come down out of the tree and because of public safety concerns, police felt that they needed to act, and they did, and that's their call."

Monday's shooting came after police had received a call about a black bear in a backyard in Newmarket on Sunday morning.

The shooting also sparked a political debate, with the opposition parties saying police shouldn't be left to deal with wandering bears.

"The MNR should've been ready to go on the weekend and first thing this morning, they should've been able to get there on time to ensure people were safe but also the bear was taken care of," Progressive Conservative natural resources critic Jeff Yurek said.

Natural Resources Minister Bill Mauro said police are the first line of defence against nuisance animals, adding he wouldn't "second-guess" the officers' actions.

Many criticized the force's decision on social media.

"It was out there for more than 24hrs and didn't do a thing. Let animal services deal with it. This is just terrible and wrong," one person wrote on Twitter.

"Unimpressed with Newmarket GYRP and the killing of the .newmarketbear. Killing him/her wasn't the answer," said another.

A few came to police's defence, saying the safety of humans must come first.

"Bear was coming down the tree -- house 500m from elementary school -- kids were walking to school and in playground safety first .newmarketbear," one said.