A police dog in Spain has gone viral for its 'heroic' efforts.

The dog, known as Poncho the pup with the Municipal Police of Madrid, flexed its first-responder skills by performing CPR on an agent who played dead. A translation of the tweet described the situation.

"Heroic" performance of our #Compañerosde4Patas Poncho, who did not hesitate for a moment to "save the life" of the agent, practicing the # CPR in a masterful way. The dog is the only being in the world that will love you more than he loves himself- John Billings #Adopta

You can hear a crowd applauding the pup as it hops up and down on the agent until it "saves" him.

Poncho continued to "save" the cop until he stood up — and gave the dog a well-deserved treat.

Since being posted on Twitter the video has been viewed over 2 million times.