An MI6 spy found dead inside a locked bag worked undercover as a woman, a forensics expert has claimed.

Codebreaker Gareth Williams, whose naked body was found padlocked in a holdall in his London flat, owned £15,000 of women’s clothing, including a red wig and make-up.

Police investigating his mysterious death suggested he was a gay transvestite interested in bondage who died in a sex game gone wrong.

But forensic investigator Peter Faulding believes the unconventional attire was for work, rather than pleasure.

Mr Faulding, who has advised the Home Office and FBI on search techniques, told the Sun: “The key question never asked was: ‘Were these clothes used for his job?’

“I am certain they were.”

A police officer stands guard outside the Pimlico flat where Mr William's body was discovered (Getty)

The expert on confined spaces – who dismissed Scotland Yard’s theory that Mr Williams locked himself in the holdall after trying and failing to do so 300 times himself – believes MI6 funded the extensive wardrobe.

Mr Faulding said the Welsh spook would have made a convincing woman and the new theory would explain why neighbours only reported seeing a woman coming and going from his London flat.

He said: “I’m certain he made a very convincing female.

“He was slim with feminine features and as a cyclist he shaved his legs.”

Police revealed Mr Williams, who had been seconded from GCHQ to MI6, had visited a drag night at a club called Bistrotheque in east London just 10 days before his death 2010 and a gay bar called Barcode three months earlier.

Mr Williams, originally from Holyhead on Anglesey, had completed fashion design courses at Central Saint Martins art college in London.

Police have insisted the maths genius was alone in his Pimlico flat and suggested he locked himself in the bag for sexual kicks.

But the coroner at an inquest into his death said there was no evidence Mr Williams was a transvestite or had claustrophilia – a love of inclosed spaces – and found he was probably killed unlawfully.