Britain's largest accountancy firms help the Treasury to draft tax laws - which the firms then use to help their clients pay less tax, it was revealed yesterday.
Senior employees from companies such as KPMG are seconded to the Treasury to work with civil servants writing complex new tax laws.
But when the consultants return to their firms they help to create tax schemes which take advantage of the same laws, to minimise the tax bills of their clients.
The practice emerged during evidence by senior executives from Britain's "big four" accountancy firms to the powerful House of Commons Public Accounts Committee.
Margaret Hodge, chairman of the committee, described the practice as "shocking" telling the executives: "You're a poacher turned game-keeper, and then you go back and become a poacher again. That is shocking. You're writing the technical stuff then you use that very stuff you've written to go away and advise your clients how to abuse the law, find loopholes in it to avoid tax."
Ms Hodge said she had seen evidence that a senior accountant from KPMG had been seconded to the Treasury to help draft new laws designed to encourage innovation by giving tax relief on the profits from patents. But when he returned to KPMG after the law was passed, he was named on a sales brochure advising clients how they could use the new law to cut their tax bills.
Ms Hodge described the revolving door between Whitehall and the accountancy firms as an abuse of process which had the potential to deny the exchequer of much needed funds to pay for schools, hospitals and other vital public services.
"What is completely inappropriate and wrong to me is that the guy who helped write the law then goes back and supports clients using that law for a purpose for which it was never intended," she said. "[The patent law] wasn't intended to avoid tax it was intended to support innovation."
However KPMG's head of tax, Jane McCormick, denied any impropriety, saying that her firm and others offered "technical advice" to government that had made the legislation simpler and more robust. "We're frequently asked to provide technical support," she said. "I think that is useful."
During sometimes ill-tempered questioning of the executives from PriceWaterhouseCoopers (PwC), Deloitte, Ernst & Young and KPMG it also emerged that the companies who use their services are able to "write off" their bills against tax - costing the Treasury around Â£2 billion a year.
It was also alleged that they advised the clients to adopt tax schemes that had only a 25 per cent chance of being judged legal by the courts. "That means you are offering schemes to your clients where you judge there is a 75 per cent risk of it being deemed unlawful," said Ms Hodge. "That is shocking."
However Kevin Nicholson, head of tax at PWC, said he did not recognise the figure.
Labour committee member Austin Mitchell said the "Big Four" were engaged in a game with the taxman which was skewed heavily in their favour. "There are 9,000 people in the four firms dealing with tax advice or tax avoidance or whatever it turns out to be, as against less than 100 in HMRC dealing with those areas," said Mr Mitchell. "This a game in which you are battling a slower-moving HMRC with fewer staff and possibly smaller brain-power - certainly you are better paid than they are. It's a game you must win. It is an illegitimate game to outwit the taxpayer."
MPs also expressed concern that the "firepower" of the accountancy firms was helping big multinational firms like Amazon gain a competitive advantage over small high street retailers.