The body of Kevin Gough, a suspected Merseyside burglar, found inside a chimney at a solicitors' firm, was identified by his fingerprints.
An inquest heard how a police officer took prints from the decomposed remains of Mr Gough, 42, and ran them through a national crime computer.
Police said they believed Mr Gough's body had been inside the chimney for about four weeks, according to the Liverpool Echo.
Staff had noticed a terrible smell and an infestation of flies, but thought it was a pigeon that was blocking the chimney.
DC Tom Bentley, of Derbyshire Police CID, gave evidence at Derby and South Derbyshire Coroner's Court: "On May 1, staff at Moody and Woolley Solicitors, in St Mary's Gate, Derby, were having repairs at their building. Because of a strong smell coming from the building, they called in a pest control company.
"The building was examined by a pest control worker and his investigations led him to believe that the source of the smell was coming from inside the chimney, which was boarded up and sealed.
"It was reported to the police who then attended."
A police spokesman said: "The area was cordoned off and the body was removed. Police are not treating his death as suspicious."
Coroner Dr Robert Hunter told the inquest how a pathologist at the Royal Derby Hospital carried out a post-mortem on the body on 2 May.
He said: "Due to the advanced state of decomposition, the pathologist was unable to give a definitive cause of death and further tests will be carried out."
In November, 2010, Mr Gough was jailed for two years and four months after pleading guilty to two charges of burgling commercial premises in Derby.
One local resident told the Derby Telegraph: "I didn't know the bloke but to hear that the body might have been inside that chimney for a few weeks is terrible."