All dog owners face the inescapable – of saying goodbye to their canine companions one day – and so did this teacher who had to put her pooch to sleep. However, after she returned to work with a heavy heart, she received a heartfelt note from one of her young students which is now going viral.

Gemma Dunne, who worked at St Michael's Primary School in Glasgow, received a hand-written poem from a schoolboy named Callum.

He penned a touching tribute for Charlie the dog and handed it to Dunne, the Daily Star reported.

The letter which contains a poem dedicated to the late dog reads: "To Mrs Dunne, sorry if you don't like it or it makes you emotional.

"I'm sorry about your dog. I want to say that your dog was cheeky, happy, adorable, relative, lucky, incredible and energetic.

"But most of all I know your dog was special and your dog is in a better place and is looking over you.

"Charlie was a great dog. From Callum."

Lucie, the teacher's daughter, then uploaded photos of the poem on Twitter, and it soon attracted widespread attention on the internet.

Since being uploaded, it has received more than 27,000 retweets and around 144,000 likes.

Many users even praised the young boy for showing so much love and affection towards his teacher. Others praised the boy's parents for teaching him to be compassionate.

One Twitter user said: "Whoever Callum's parents are they need a good pat on the back for raising a lovely, thoughtful child."

Another said: "So sad to hear about the dog but bless little Callum! I hope that he stays sweet even when he grows up, the world needs people like him. His parents are bringing him up well."