AFTER a couple of months of talks with the Chinese authorities, Google announced on Monday March 22nd that it had stopped censoring search results on its China portal, Google.cn, and was automatically redirecting its users to Google.com.hk, an uncensored portal in Hong Kong. The company said it would try to maintain an advertising-sales operation in China, and would continue research and development work there. However, it acknowledged that the Chinese authorities might block access to its site, in effect putting it out of business. Google's decision follows several attempts to hack its e-mail system, ever stronger censorship of its searches, legal complaints tied to its digitisation of books, and—always a worrying sign in China—growing vitriol in the state-controlled press.

If Google, which first raised the prospect of withdrawal in January, seems to have hesitated on the way towards the exit, there are 400m reasons why. That is the number of people in China, the government reckons, who use the internet. Increasingly, they are choosing it over other media, notably television, as a source of entertainment, information and opinion, say Max Magni and Yuval Atsmon of McKinsey, a consultancy. Over the past decade revenues from digital advertising have grown exponentially, admittedly from a tiny base, and the trend, predicts Mr Atsmon, will continue for some time.

Foreign internet firms operating in China have been quick to see its potential but largely unable to grasp it

Foreign companies operating in China have been quick to see this potential but largely unable to grasp it. Facebook, Twitter and YouTube are all explicitly blocked. EBay faltered because of its own managerial errors, but also because of delayed approval for PayPal, its online payment system, which this week announced a partnership with a Chinese rival. Yahoo! caused a stir by allowing the Chinese authorities to probe its users' e-mails in a hunt for political dissidents—something it has since pledged not to do.

There are now domestic Chinese equivalents of all these sites—Baidu for Google, Taobao for eBay, Renren for Facebook, QQ for instant messaging, games and social networking—and they are doing well (see chart). The vast traffic they attract brings huge potential revenues and lots of useful data that could help them shape the internet in future, rather than merely following Western models, says Duncan Clark, chairman of BDA China, a consultancy.

To the extent that Western firms have seized on the growth of the internet in China, it has often been as a marketing tool. McKinsey cites two examples: Nestlé has promoted coffee in a tea-drinking country with clever online ads about the joy of a coffee break, and Nokia has run music promotions and competitions, accessed via its handsets, in conjunction with video sites.

Outright revenues from the internet may become even harder to capture in years to come as China takes further steps to control access. Content providers like Google have always needed to obtain local licences, and have thus been required to have a Chinese subsidiary or partner. As awkward as this has been, new rules expand these impediments, requiring the licensing of domain names and, potentially, foreign sites as well.

Google's possible departure from the Chinese market sends a chilling message to companies that remain. Advertisers and workers can both see that they will be better off with entities the Chinese government favours, which means domestic firms. A withdrawal would also cast a new light on Google itself. It is often perceived to be successful because of advanced technology, but, as China shows, it thrives only to the extent that local laws permit it to link to content and distribute it without interference. Alter the legal environment and the commercial results are quite different.