Tax chiefs at the big accountancy firms have defended themselves against claims they are behind avoidance schemes that damage the UK's interests.
MPs on the Public Accounts Committee accused them of making corporate taxable income "vanish into thin air".
But the tax chiefs, including from PwC and KPMG, said many common assumptions about avoidance schemes were wrong.
Jane McCormick, KPMG's tax head, said there was "no appetite among clients" to do anything outside the law.
The committee was taking evidence from the Big Four accountancy firms, which also includes Deloitte and Ernst & Young, at a time when issues of tax avoidance have moved centre stage.
Revelations about the tax arrangements of companies including Google, Amazon and Starbucks - which use the Big Four - have sparked a debate about tax avoidance. Last week, Prime Minister David Cameron said countries had to work together to clamp down on aggressive avoidance schemes.
The tax heads defended the use of tax havens, arguing that it was wrong to say that companies just routed money through "doors with a brass nameplate".
If a company is registered in a tax haven, it has to have staff and facilities there, said Kevin Nicholson, PwC's head of tax. "If there was no substance there, the advice would not work," he said.
The panel of experts also rejected suggestions that by advising companies to avoid tax, they were breaching the spirit of the Companies Act, which requires directors to act in good faith and maintain high standards.
Conflict of interest
Asked by PAC chairwoman Margaret Hodge about the legality of some avoidance advice, the tax heads accepted that 10 or more years ago, the advice may have sailed closed to the wind.
However, John Dixon, tax head at Ernst & Young, said: "The advice we give is based on substance and fact. I think that the world you refer to is gone."
The four experts were also questioned on their relationship with government. All the Big Four provide technical advice to Whitehall on the drafting of tax legislation. The MPs accused the firms of then advising corporate clients on how to avoid this legislation.
Ms Hodge said the firms should be barred from getting government contracts in order to avoid a conflict of interest. But PwC's Mr Nicolson said: "The role we play makes the tax system work."
As the committee hearing came to a close, the tax experts also took exception to Ms Hodge's parting shot. She praised their abilities, intelligence and expertise, adding: "You could give so much more to the public good, but you choose to work in areas that reduce resources" for schools, hospitals and society.
All the experts replied that they were very proud of what they did.