A police dog in Spain won thousands of hearts after a video surfaced showing the canine performing CPR in an attempt to save an officer's life. Madrid Police posted the footage to Twitter on Monday as officers trained the dog.

The video was taken as part of canine training during a health emergency. In the heart-warming video, the handler pretends to collapse while training the dog named Poncho. As soon as he hit the floor, Poncho raced over to the man to help.

The dog began using the techniques he had been taught which could save a human's life. 

After first nudging the man's side to try to wake him, the dog began jumping up and down repeatedly, using his front paws to perform chest compressions on the officer. Before resuming his compressions, the dog put his ear on the man's chest to listen for a heartbeat.

Social media users were impressed by the dog's lifesaving abilities.

The Police of Madrid also praised Poncho for not hesitating to “save the life” of the agent. In the tweet, the 19th-century American writer John Billings was also quoted, who said: “A dog is the only thing on earth that loves you more than you love yourself.”

CPR, which stands for cardiopulmonary resuscitation, is an important life-saving technique which can be carried out when a person’s heart stops beating. CPR can double or triple a person’s chances of living, if performed correctly.

This is not the first time a dog learned CPR. In 2017, a German shepherd made headlines after he performed CPR on his owner.

Performing an army-themed routine at the prestigious Crufts dog show in the U.K., Lusy Imbergerova trained her dog Deril to jump on her chest, earning rapturous applause from the audience.