David Smith is planning a management buyout of Acme Ltd, a private company.

In 1985 he sets up an offshore trust in his own name to buy the company's share capital of pounds 50m. The trust is set up and run by a merchant bank, Offshore Partners (Jersey). Because it is based in the Channel Isles, there is no need to worry about UK taxes.

Acme goes from strength to strength and, 10 years later, the shares in the trust are sold for pounds 200m in cash. The accumulated capital gains tax (CGT) liability on pounds 150m profits at a 40 per cent rate would be pounds 60m, but as long as the profits stay in the offshore trust this liability is deferred.

Mr Smith decides to bring the trust onshore to get his hands on some of this money. So he can still avoid paying the CGT, Offshore Partners (Jersey) pass on the trusteeship to Offshore Partners (UK), a sister company based in London.

Once the move onshore is completed, Mr Smith sells his beneficial interest in the trust to Tax Haven Holdings, another offshore company. They agree to pay him 95 per cent of the pounds 200m value in the trust - or pounds 190m.

Section 76 of the Taxation of Chargeable Gains Act 1992 makes gains realised from disposal of interest in a UK trust exempt from CGT, so Mr Smith is left with pounds 190m tax free. From this, he will have to pay Offshore Partners Group their heavy fee for setting up the whole deal.

Under the new arrangements, there will be no tax benefit to Mr Smith bringing his Jersey trust onshore. Selling his shares for pounds 200m will create a CGT bill of pounds 60m, leaving him with just pounds 140m after tax.

Philip Harrison, a tax partner at the law firm Eversheds, explains the loophole: "You were turning the original CGT deferral offered by the offshore trust into outright CGT avoidance. It was a way of bringing back the contents of the trust without triggering a UK tax bill."