A senior judge is to be brought in to investigate a series of highly controversial tax deals which cost the Exchequer millions of pounds in lost revenue.
The judge is expected to be given the power to examine the private accounts of Goldman Sachs and Vodafone to establish whether senior inspectors wrongly "let them off" multi-million-pound tax bills.
The National Audit Office, which is supervising the inquiry, is also considering whether to examine the tax affairs of other big companies to establish whether HMRC officials routinely signed off deals which underestimated the true liabilities of the companies.
The move comes after the House of Commons Public Accounts Committee (PAC) accused Britain's top Revenue official, Dave Hartnett, of misleading Parliament following a deal with Goldman Sachs that allowed the US investment bank to avoid more than £10m in tax penalties. It also accused officials of allowing Vodafone to pay just £1.25bn in a tax dispute with the Government, despite a potential tax bill of £8bn.
In a sign of how seriously the Government regards the problems facing HMRC, Sir Gus O'Donnell, the Cabinet Secretary, has also announced the appointment of two new commissioners with tax expertise to oversee large tax settlements.
The commissioners, who are appointed by the Crown to represent the interests of the taxpayer, are the only people who have the authority to sign off such deals with large companies.
Previously HMRC only had four commissioners, and just one of them, Mr Hartnett, had direct experience of dealing with highly complicated tax liability issues.
The PAC had criticised HMRC because commissioners were both negotiating and signing off deals.
It is due to publish its report into HMRC before the end of the year. It is likely to be highly critical of Mr Hartnett and the general management of the agency. It will fall short of calling for Mr Hartnett's resignation, but if further irregularities are exposed by the National Audit Office investigation his position could become untenable.
Margaret Hodge, chairman of the PAC, said she was pleased that the NAO had agreed to investigate. "This judge-led review will be looking at whether the deals that were done were reasonable," she said. "It will examine whether they took proper legal advice and whether HMRC met their own protocols. It will also mean that an independent expert will be able to analyse the details of these deals to determine whether or not the amount they paid in tax was reasonable."
Responding to the appointment of two new tax commissioners, she said it was a welcome sign that HMRC was beginning to put its house in order, but added much more needed to be done.
Sir Gus has said that the department is looking at other ways to "extend external accountability" and bring "extra accountability in terms of external professional input into these large deals".
Jesse Norman, a Conservative member of the Treasury Select Committee, who has been critical of HMRC procedures, welcomed the idea of a judge being given access to details of the deals.
"This move goes some way to addressing Parliamentary concern about issues of governance and accountability at HMRC," he said. "Tax details of individual companies should be kept confidential but they should be independently reviewed."
A spokesman for the NAO confirmed the inquiry but said no appointments had yet been made. "At the moment we are still in the process of scoping the extent of the work we need to do," the spokesman said.
At the end of March, HMRC was investigating more than 2,700 cases with big companies, involving £25.5bn of tax.
Under fire: Goldman and Britain's tax chief
Dave Hartnett, permanent secretary for tax at HMRC, has been dogged by allegations that his department is incompetent and controversy over its dealings with big firms.
Last summer, he was criticised by ministers after millions of workers were left with the wrong tax code and faced backdated bills. Last month, the Public Accounts Committee accused Mr Hartnett of lying over a settlement with Goldman Sachs, which cost the taxpayer almost £10 million.
He had told the Treasury Select Committee he did not oversee HMRC's dealings with Goldman. But leaked documents revealed Mr Hartnett, pictured, had been involved in settling a dispute over taxes that Goldman had tried to avoid paying.
Mr Hartnett is accused of reaching an agreement with Goldman whereby it did not have to pay back £10m interest on tax it had avoided. The firm was found to have employed London-based workers in the British Virgin Islands, pictured, where they did not have to pay tax on bonuses.
Mr Hartnett denies lying.
* This article originally contained a typographical error which suggested that a settlement reached by the HMRC with Goldman Sachs cost the taxpayer £7bn. It should have read £10m, as noted elsewhere in the piece.