The 62-year-old will advise developing countries on how to improve the effectiveness of their tax administrations and work one day per week.

The appointment was approved by David Cameron, subject to six conditions set out by the advisory committee on business appointments to guard against any possible conflicts of interest.

These include that he cannot “draw on privileged information” from his time at HMRC, or advise “any taxpayer that he has been involved with” during his time at the Revenue.

Just a few weeks ago, a high court case brought by pressure group UK Uncut found that the deal constructed by Hartnett with Goldman Sachs to avoid paying penalty charges was “not a glorious episode in the history of the Revenue”, despite being lawful.

The group claimed that HMRC had acted illegally when it reached a settlement over the amount that investment bank Goldman Sachs needed to pay in tax. UK Uncut Legal Action said the taxpayer had been cheated of up to £20m in national insurance contributions. HMRC said the maximum lost to taxpayers was £8m.

Deloitte said in a statement, “Dave Hartnett will work as a consultant to Deloitte advising foreign governments and tax administrations, primarily in the developing world. He has significant experience in advising such countries on the development of effective tax regimes, necessary to ensure their continued economic growth. He will not work with UK companies or with HMRC.”

The advisory committee on business appointments that vetted the appointment “noted that while working in government, Hartnett did have official dealings with Deloitte, and that he also dealt with a wide range of major accountancy and law firms during his time in HMRC and the Inland Revenue before that”.