Police inspector Roberto Lima said by telephone that on Sunday Jose Marcos Araujo identified a body at the city morgue as being that of his brother, Gilberto.
Lima said that Jose Marcos took the body to his mother's home where a wake was held.
"The confusion started when news started circulating that a car washer had been shot dead," Jose Marcos' wife, Ana Paula, told the UOL Internet news portal. "Police called my husband and told him that his brother had been killed and his body was at the morgue."
Lima said the confusion was "understandable."
"The two men closely resembled each other and both worked as car washers," Lima said adding that the man whose body was in the morgue was named Genivaldo Santos Gama. He said further information on Gama was not immediately available.
A few hours before the Monday burial "a friend of Gilberto's saw him walking down the street and told him that his family was mourning him," he said.
"So he went to his mother's home to let everyone know he was very much alive."
When Araujo showed up at his wake "some people fainted and others were so scared they ran away. It was a big shock," family friend Maria Menezes told the G1 online news site.
Gilberto's mother Marina Santana told reporters "I am overjoyed. What mother wouldn't be after being told that her son is dead and then sees him alive."