For nine years, Zhang Ningquan was the picture of an efficient court investigator. From a bureau headquarters in Beijing, he oversaw branches in seven provinces, with men in police uniforms using "official" cars. Except there isn't such a bureau, Zhang wasn't an official and none of his staff were genuine.

Some 16 million yuan (HK$18.2 million) has allegedly been pocketed by Zhang posing as a chief court investigator since at least 2001.

He could have continued his scam had he not enraged the internet community by holding an extravagant funeral for his "wife" in 2007, calling her a "martyr" and laying the Communist Party flag over her urn. The wife turned out to be a mistress.

Dubbed online as "history's most impressive fake bureau chief", Zhang's set-up was simple in concept and elaborate in execution, according to a report by the Procuratorate Daily yesterday.

The basics were an office in the building that formerly housed the Ministry of Justice, staff in fake police uniforms, and cars painted similarly in blue and white. No details were missed. Everything came complete with badges, and the characters diao cha (investigate) were found on the "investigators" and their cars. The badges even carried the initials TPDC, presumably meaning Tianping Diao Cha, the short form of the fake government bureau known as the Beijing Tianping Investigators' Management Bureau.

Zhang was tried in February for fraud and is expected to receive his judgment soon. However, the facts of his case were not revealed until yesterday.

Zhang allegedly claimed the fake bureau was a subsidiary of the Ministry of Justice, and he used the name of the bureau for a variety of scams.

In 2004, in the name of setting up investigator training centres in Zhejiang province, he received investment funds from two businessmen totalling 1.48 million yuan.

In 2006, in the name of setting up branches in different cities, Zhang received 5.2 million yuan in "sponsor monies" from a dozen or so individuals and companies.

He received 4 million yuan for being the spokesman for a Zhejiang car brand, and he got away without paying for 41 SUVs from the same car company, worth 2.4 million yuan, saying it was the company's honour that its cars were chosen as "government-designated vehicles".

Between 2006 and 2008, Zhang received 1.4 million yuan from more than 30 people who paid for a training course to become court investigators and who were told they would be considered civil servants.

Everything went smoothly under Zhang's meticulous operation, and his bureau expanded to seven provinces. His aim was to open 300 branches.

However, the death of his mistress in a car accident in 2007 was a turning point. The devastated Zhang built a luxurious marble tomb for her in Zhejiang. There were two tombstones - one said "my beloved wife Wu" and the other said "martyr".

The funeral shocked the chat rooms. In particular, the uniformed staff at the funeral prompted the question why the badges on their "police uniform" said "investigation" instead of "police". Soon an anonymous letter was sent to the Beijing police, and the scam that went on for years right under the nose of the Ministry of Justice was busted.

Yesterday, about half a dozen of Zhang's fake "investigation" cars could still be found parked in a back alley of the building that used to house the ministry in Beijing. It is an ordinary six-storey concrete building, with a huge car park, deep in Xiaguang Li, Chaoyang district.

Since 2001, it has been the campus for the ministry's Institute of Judicial Administration, but yesterday several law firms were sharing it. Zhang set up his first company, the Beijing Tianping Police Culture and Communications Company, in 2001, but he could have been in the building before then, according to a property management employee who started working at the building in 2000.

The employee, who refused to give his name, said anyone with a proper business licence could rent the building for use after the ministry had moved out. "I've seen Zhang around. His floor used to be very popular, with many people coming in and out," the man said. "It was such a big company. Who would have thought it could be fake?"