The white cat wouldn't leave the grave, even after the family tried to dislodge it several times. Facebook/Soffuan CZ

A funeral is probably the last event you'd want to go wrong. But what happens when things don't go as planned? Like when a cat decided to crash a funeral in Malaysia.

Soffuan CZ's family was mourning the loss of their grandfather Ismail Mat when a white cat approached the new grave.

As the animal started to circle the grave in the middle of the ceremony, Soffuan filmed his aunt and cousin's attempts to move the feline away from the fresh mud.

However, the cat simply refused to move. The video, uploaded on Facebook, was viewed 7 million times and shared more than 11,500 times in less than 24 hours.

"My grandfather was a man who loved cats," Soffuan explains in a Facebook post recounting the awkward moment. He adds that the cat was not his grandfather's pet.

However, the cat clung to the grave at each attempt to dislodge him. "The cat wouldn't leave the grave when we wanted to go home," Soffuan said.

After the initial post, Soffuan uploaded another video showing that the animal was still by the grave, scratching the mud and rolling around.

Lots of people asked Soffuan questions about the cat so he asked people in his town for information. "They said the cat was always wandering around the mosque," he said, adding that locals said the cat remained at the grave even after everyone had gone home.

Some viewers expressed their concerns for the feline's well-being. In the initial video, Soffuan's aunts and cousins can be seen grabbing the cat's legs and pinching its belly. The young man defended his family, saying they had cared for several other cats and were animal lovers.

cat man's grave
The cat refused to leave the man's grave. Facebook/Soffuan CZ