The immediate cause of the legal action is that, in the course of his libel dispute with the former Tory MP Neil Hamilton, Mr Fayed talked about having cash which the Inland Revenue claimed he should not have had. The result was that the Inland Revenue cancelled an arrangement under which he paid a fixed rate of tax each year (£250,000) without declaring what his real earnings were. Mr Fayed is suing the Inland Revenue for breaking the arrangement, which had been in place since 1985. And it is that arrangement - known as a "forward contract" - that may conceal a scandal.

Our information is that the Inland Revenue has agreed a series of forward contracts with a small number of powerful individuals who have used offshore havens to conceal their earnings with such skill that the Inland Revenue simply cannot assess their true tax liability. And so, in these cases, the taxman has been forced to abandon the normal process of tax assessment in favour of negotiating a regular annual payment. Effectively, the Inland Revenue has allowed this elite group to opt out of the system: they are not required to provide a full declaration of earnings of the kind that every other British taxpayer must provide and, more important, they are allowed to pay only a fraction of the tax they are believed to owe.

Both of these loopholes are linked to the world of offshore havens. To understand the full impact on the Treasury of their use, you have to appreciate the sheer scale of the growth of offshore investment. Essentially, the havens charge an annual fee for the right to register in their jurisdiction; in return, they demand no tax, impose no rules and guarantee secrecy. Years ago, a few of them were developed for the benefit of wealthy individuals: Switzerland, Liechtenstein, the Channel Islands. Now, with the tidal movement of cash unleashed by the globalised economy, they have boomed. At the last count, the International Monetary Fund had identified 69 of them.

The amount of money they handle is staggering - all of it potentially diverted beyond the reach of government revenue collectors. Bankers estimate that a third of the planet's GDP is channelled through them. Slightly more than half of the money passed around the globe each day moves through their accounts, and the flow is said to be increasing by up to 15% a year. There are now something like 3 million corporations with no identifiable owner, and the Organisation for Economic Cooperation and Development (OECD) estimates that 60% of world trade consists of transfers within multinationals, passing profits to anonymous subsidiaries in tax-free jurisdictions.

The Cayman Islands, where we found some of the Rausing family money (as revealed in yesterday's Guardian), has a population of only 35,000 but is the world's fifth largest financial centre. It is home to some 57,900 corporations and trusts and 46 of the world's top 50 banks. Most exist only as nameplates on a local accountant's door, simply paying a licence fee for the privilege of saying that they are based in a country which guarantees to charge them no tax and to disclose no information about their owners or their accounts. And business is booming.

All this has daunting implications for mainstream states. How can their courts prosecute a company if its directors are unknown, or fine a company whose assets are beyond their jurisdiction? How can their governments attract capital to their economies when they are committed to using precisely the regime of tax and regulation from which the havens offer an escape?

Ronen Palan, a Sussex university academic, argues in an unpublished book, The Offshore World, that this mass sale of a fictional "right of abode", is attacking the power base of national government: "Offshore is certainly not the sole cause for the decline of the nation-state, but it must be seen as an important contributing factor to the decline."

But the immediate concern is that the havens provide a refuge from the revenue collectors on whom all governments depend. Non-domiciled residents pay no UK tax on earnings they leave in the rest of the world and, by using off shore trusts and banks, they can ensure they pay no tax anywhere. Those with forward contracts take advantage of the secrecy of the havens: global income and capital gains cannot be tracked so the taxman is forced to cut a deal.

Mr Fayed has taken advantage of both loopholes. His birth in Egypt allows him non-domicile status which means he pays no UK tax on income or gains left outside the country. When he does bring cash into the UK, he has to pay tax only if it is designated income and not capital. The difficulty for the Inland Revenue has been that his affairs are concealed behind so many accounts that they could not establish what was income and what was capital, and so they gave him a forward contract.

We are told that the almost impenetrable secrecy of the offshore havens has similarly undermined the taxman's efforts to persuade corporations to pay their dues. A former Inland Revenue special compliance officer told us that routinely the largest UK corporations now pay their tax "by agreement", adding: "They submit accounts. We have no way of telling whether they are accurate or not. We could argue with almost every line but they would argue back, and neither side has the time."

Working through the OECD and with Gordon Brown's support, the Inland Revenue has persuaded some havens to open their doors to them on money laundering and illegal tax evasions. But tax avoidance which uses loopholes without breaking laws remains concealed by secrecy. Part of the difficulty is that, though some of the offshore havens talk about changing their rules, none will make real change on avoidance unilaterally. They will lose their income if they do.

There is an international convention on trusts, but the Cayman Islands advertises that they have not signed it. All 185 member states of the UN are supposed to be bound by a 1988 convention requiring them to adopt a list of measures to clamp down on abuse. At the last count, only 30 had complied - and not one was a tax haven.

The other part of the problem is that at the same time as the tax-raising arm of government pleads for more power, the investment-raising arm is worried about triggering a flight of capital. Pursuing wealthy Arabs for tax, the Inland Revenue has found the Foreign Office actively advising the Arabs on how to avoid it. Over the past 12 months, the National Criminal Intelligence Service has been talking to the Treasury about trying to force nominee companies in the UK to declare their real owners, but the department of trade and industry has been resisting. They say it would cost too much to administer.

In the same way, in the US last year, while the Internal Revenue Service was estimating that tax avoidance was costing the US economy more than $195bn (£139bn) a year, George Bush moved into the White House on a conservative tide of lobbying to preserve the very tax havens which were draining the treasury. Since then, the offshore links of al-Qaida have silenced the lobby, but, even now, with the Americans pressurising the havens into releasing information on illegal activity, there is every reason to think they will line up behind the Swiss who now say they will release limited information from numbered bank accounts so long as it does not concern mere tax avoidance.

In its efforts to stop the haemorrhage of funds, the US Internal Revenue Service (IRS) has published evidence that 2,680 citizens with incomes of more than $200,000 (£143,000) claimed they owed no tax; a further 13,630 in the same income bracket paid an effective rate of only 10%; and 17% of the 7,500 corporations with assets of more than $750m (£520m) filed returns claiming they owed no tax at all. Their statistics also show that the number of audits of wealthy taxpayers has plummeted while audits of those earning less than $25,000 (£18,000) has soared. In 1998, Charles O Rossotti, the commissioner of the IRS, testified before the Senate finance committee that non-compliance with the internal revenue code was costing every taxpayer in the country more than $1,600 (£1,100) a year.

We asked the Inland Revenue for parallel figures for the UK. They had none of them (in sharp contrast to the government's publishing of figures on social security fraud). Nor did they have any estimate of the amount of UK cash in offshore havens nor of the loss to the Treasury through the domicile rules. A senior government figure acknowledged the wealthy were avoiding tax on a grand scale, shrugged and said: "It's just life".

Additional research by Max Houghton