Murdered underworld boss Carl Williams was one of the first to suspect he was being double-crossed by his own lawyer, whose role as police informer 3838 has potentially compromised dozens of convictions and sparked a royal commission.

A hand-written letter obtained by The Age reveals Williams complained to an associate that his trusted lawyer had struck a deal with police to turn a close friend and drug-dealing hitman against him.

Carl Williams in 2004. Credit:Jason South

The letter was sent in 2006, when Williams was on remand in Barwon Prison awaiting trial on murder.

The hitman, who cannot be named, gave detailed statements against Williams and drug lord Tony Mokbel, telling police about how they had formed a criminal alliance, who they had targeted for murder, and which corrupt police had provided inside information.