VANCOUVER -- Two cougars linked to a number of recent dog attacks in Metro Vancouver were captured and killed on Thursday night, according to B.C.'s Ministry of Environment.

Officials said conservation officers had been monitoring the animals for weeks in the Port Moody and Anmore areas, and witnessed an escalating pattern of concerning behaviour.

That included spending time hanging around homes and a school during the day.

"We know the public was understandably concerned about cougar incidents in their neighbourhoods," a ministry spokesperson said in an email

"While we recognize this is an unfortunate outcome, it was necessary as the risk to the public was far too great – these cougars were displaying repeated behaviour indicating they had lost their fear of humans and were comfortable living and hunting non-natural prey in an urban residential setting."

Last weekend, conservation officers caught another cougar near Port Moody's Ioco Road and euthanized it, citing the same concerns about increasing risks to the public.

One of the recent dog attacks took place days earlier in Anmore, where a young German shepherd puppy, which was intended to be trained as a search and rescue animal, was carried away by a cougar on Heritage Mountain.

Three dogs have been killed and two others injured in the Anmore and Port Moody areas since Aug. 1, according to the B.C. Conservation Officer Service.

With the three cougars killed, the Ministry of Environment said conservation officers will continue to educate the public to avoid further conflicts in the communities.