(Picture for representation) A German Shepard was seen trying to help his friend to climb a wall.Pixabay

A touching video of a dog helping another dog, who got its head stuck in the railing above a small wall, has gone viral and is winning millions of hearts.

The video was shot in the Pavon neighborhood in the city of San Luis de Potosi, central Mexico, by Edith Govea, who then posted it on Facebook. Govea said the German Shepherd and the white dog were buddies, according to Daily Mail.

Govea said, according to Mirror, that the German Shepherd's name was really Bunny, while the white dog is called Malik. 

The video showed a little white dog hanging from a railing with its head stuck between the grills above a short wall. The poor creature was seen struggling to get to the other side of the wall through the grills, but could not pull itself up to the wall.

Suddenly, a large German Shepherd — Bunny — appeared from the other side of the wall and seemed to comfort the smaller dog. Bunny then tried to pull Shorty through the grills. The bigger dog was seen tugging at its buddy's collar.

Shorty managed to get a little purchase by getting its left rear leg onto the wall, and then used it to pulled itself on the wall between the grills.

It seemed exhausted and thus waited a little before jumping on to the other side.

After the adventure, the two dogs were seen chilling together in a picture posted by Govea on social media.

"I spend a lot of time in this area and I saw these two dogs and I found it bizarre how he fought to help his friend... It is beautiful to see how dogs also show love," Govea was quoted as saying by the Mirror.

The post has been shared more than 118,000 times and has garnered well over 20,000 reactions.

Check out the post here: