A youth Calgary police say stabbed a K9 officer during a break-and-enter investigation on Sunday could spend up to five years in prison under a recent update to the criminal code that protects law enforcement animals.

Quanto’s Law, which took effect in July 2015, is named after an Edmonton police dog that was stabbed to death while chasing a suspect in 2013. The charge carries a maximum sentence of five years and sets out a mandatory minimum six-month sentence if the animal is found to have been injured intentionally.

According to Calgary police, one of the two male suspects who fled the scene of a break-and-enter investigation at a local high school around 2 a.m. on Sunday stabbed a police service dog in the head multiple times before being brought into custody.

Both suspects were arrested at the scene. Police said they are under 18 years old, and that one of them suffered minor injuries from the dog.

“They’ll be charged with the break-and-enter,” Acting Staff Sgt. James Lines told reporters on Sunday. “The offender that stabbed the police service dog is going to be charged under the new section of the Criminal Code, section 445, which deals with injuring a police animal in the execution of its duties.”

The dog, identified by police as a German shepherd named Jester, was rushed to an emergency veterinary hospital in life threatening condition. Jester was taken into surgery, and is now said to be in stable condition.

“He is up walking around and he is back with his owner,” Lines said. “The K9 handler I know quite well. He is taking it pretty hard, but Jester is going to be fine.”

The Calgary Police Service is offering support to the dog’s handler.

Lines said it is too soon to determine if Jester will return to duty, adding that injuries to a K9 of this severity are “very rare.”