The authorities in Saudi Arabia, who recently boasted that they had found a way to censor the internet, are now licking their wounds in a cyberwar against an opposition group based in London.

It is only two years since the authorities decided - nervously - to connect their country to the internet. They were worried, right from the start, that internet users could not be trusted to stay away from pornographic, gambling and other "undesirable" websites.

So they spent vast sums on a computer system at King Abdulaziz City of Science and Technology in Riyadh, which has Saudi Arabia's only recognised link to the internet, to filter out offending material. In May last year, Dr Fahd al-Hoymany, director of the monitoring system, announced triumphantly that his team had succeeded in blocking all major pornographic sites.

But that was not the whole story. They were quietly using the same technology to block politically sensitive sites which criticised the Saudi government.

The Saudis' internet censorship works in two ways. First, it caches approved web pages in a 500-gigabyte storage system. This allows the most popular pages to be accessed quickly without the system having to check their suitability each time. It also means that what users in Saudi Arabia see is not the original page on a server outside the country, but a copy on the computer in Riyadh.

Requests for pages that are not stored in the cache are passed to the second stage of the system, supplied by a US-based company, Websense, which lists and can filter out 30 categories of potentially unsuitable sites. Maintaining the list of banned sites is a mammoth task for the team in Riyadh, because of the need for regular updating.

Among those they tried to ban was a website belonging to the London-based Movement for Islamic Reform in Arabia (MIRA). As its name suggests, the site is certainly not pornographic, though it does contain some highly unflattering profiles of Saudi princes.

For a while, MIRA and the Saudi authorities played a cat-and-mouse game. Each time the site was blocked, MIRA moved to a new web address. It usually took the authorities a week to find the new address and block it. In the meantime, MIRA's problem was how to communicate its new address to web users in Saudi Arabia.

That, according to Dr Saad Fagih of MIRA, has now been solved - and it's the opposition's turn to claim victory. MIRA's solution - like the Saudis' censoring system - consists of two stages. The first is some technical tweaking of port numbers which allows MIRA to switch its website almost instantly to any one of 64,000 addresses without having to register a new domain name.

The second is a smart way of telling people where to find the site. Users simply send a blank email to islah@islah.org and within 60 seconds or so they get an automated reply giving the current address. Provided that users send their message by webmail - Hotmail, Yahoo, etc - there is no way the authorities can stop it, Dr Fagih says (if you try this, bear in mind that MIRA's site is in Arabic, so you may see a lot of question marks or weird symbols if your web browser doesn't support Arabic script).

As proof of his victory over Big Brother in Riyadh, Dr Fagih says the number of hits on the site has leapt from 20,000 a day to 75,000. What is more, he claims that Big Brother has finally abandoned its efforts to block the site (he knows this, he says, because MIRA's technicians are able to hack into the computer in Riyadh and check).

Belatedly, the Saudi authorities have also recognised that their expensive censoring system may not be as effective as they thought. But their response has been bizarre. On February 12, the Council of Ministers laid down new internet rules for the kingdom. Among other things, these ordered internet users to refrain from accessing data containing the following:

 Anything contrary to the state or its system News damaging to the Saudi Arabian armed forces Anything damaging to the dignity of heads of states Any false information ascribed to state officials Subversive ideas Slanderous or libellous material

At one level, this is almost a self-parody, providing abundant ammunition for all those who decry Saudi Arabia as a backward, medieval country with more money than sense. It smacks of the attitude found in Britain a few hundred years ago among those who believed the masses should not be taught to read in case they got some unsuitable ideas into their heads.

At another level, it demonstrates that the Saudi government is living in a fantasy world where internet users are endowed with magical powers which allow them to determine whether a web page contains false information, subversive ideas or libellous material even before they have looked at it.