A man in the United Kingdom died while trying to save his pet dog, an inquest heard Friday.

The man, identified as 36-year-old Gary Davies from Wales, died earlier this month after being buried alive in a hole. The court heard the man’s pet dog ran loose and fell down a hole in a field. Davies too dug his way into the hole to get the dog to safety. Just then, the loose earth collapsed on him, burying him inside the hole.

"Mr Davies had gone in the hole trying to reach the dog and some of the loosing fell on top of him and buried him," Coroner's officer Emma Mathias told the court, Wales Online reported.

Emergency services arrived at the scene and pulled him out of the hole. He was rushed to a nearby hospital where he died five days later on Jan.16. The fate of the canine was not known.

Meanwhile, an autopsy revealed he died from a brain injury.

"It is a terrible tragedy because he was such a young fella. It is awful for his wife and family," local councillor Donald Jenkins said.

Davies was a farmer and had three children. A full hearing will take place once all the evidences are collected by the investigators.

In a similar incident last year, a man died while trying to save a drowning dog in Turkey. Abdulkarem al-Saeed, 20, was walking near an irrigation canal when he noticed the canine drowning. He jumped into the canal and tried to grab the canine, but struggled to stay afloat. His cousin, who was witnessing the scene, threw a rope to save Saeed, who could not reach it and drowned in the canal. His body was found two days later, some 5 miles away from where he disappeared.

In another incident, a toddler in Arkansas died while attempting to save his dog from a house fire. Loki Sharp, who had escaped the blaze, ran back into the residence to rescue the canine. The toddler and his pet dog died in the fire.

UK Police Tape
In this image, a police tape is photographed in Chester, United Kingdom, July 4, 2018. Christopher Furlong/Getty Images