A family in Brazil had the surprise of their lives when a dead man walked into his own funeral.

A man known as Gilberto was reportedly shot dead while working at a car wash, according to Brazilian authorities in the north eastern town of Alagoinhas.

The 41-year-old's body was identified on Sunday by his brother Jose Marcos Araujo who said the dead man was indeed Gilberto.

However, when the funeral was held at Gilberto's mother's house on Monday, everyone received a shock when the man they were mourning walked in both alive and looking well.

Police inspector Roberto Lima said that just a few hours before the wake "a friend of Gilberto's saw him walking down the street and told him that his family was mourning him".

Apparently Gilberto was on his way to tell his family that he wasn't dead.

"So he went to his mother's home to let everyone know he was very much alive," said Inspector Lima.

The family was immediately shocked and confused seeing the what they thought was the living dead. But once everyone calmed down they were immediately relieved, especially Gilberto's mother.

"I am overjoyed," said Gilberto's mother, Marina Santana. "What mother wouldn't be after being told that her son is dead and then sees him alive?"

So what was the identity of the man who actually died and was identified at the morgue?

Apparently it was Genivaldo Santos Gama, one of Gilberto's coworkers at the car wash who looked very similar to the man first thought dead. So similar in fact that Gilberto's own brother mistook the face when he saw the body in the morgue for identification.

No information has been released on Gama or the reaction of his family.