FOR years China's home-grown hero, Monkey King, has had to compete on screen with the growing influence of an American mouse named Mickey. As Walt Disney and other foreign studios seek to enter China's film market, and a new Disneyland theme park rises in Shanghai, the mouse's position might look strong. But the monkey still holds plenty of cards.

China is now the world's second-biggest film market after America. It has a booming home-grown film industry, making historical dramas and romantic comedies, but foreign blockbusters are the big money-earners. Although most films are pirated on release and viewed online and on dodgy DVDs, the rising middle classes are increasingly willing to fork out for a night at the cinema. Last year China's box-office take rose by more than 30%, to over $2 billion, according to the Motion Picture Association of America. The number of cinema screens in China has doubled in five years, to nearly 11,000—again, second only to America. China's box-office revenues may overtake America's by 2020.

Yet China will not grant Hollywood the access it desires. Until recently only 20 foreign films could be screened at Chinese cinemas each year. In February the number increased to 34—though only if the extra 14 are shown in 3D or large format.

So, to guarantee their films are released in China, American studios are trying another ploy: seeking a Chinese partner. Co-productions are not classed as imports and so bypass the 34-a-year quota. They may have better luck being distributed, too.

A number of co-productions are under way. Walt Disney recently announced its first partnership with DMG Entertainment in Beijing to produce “Iron Man 3”, starring Robert Downey junior. This week, during a visit to the Beijing International Film Festival, James Cameron, a director, said he is looking for co-production opportunities in China for sequels to his film “Avatar”. The film remains the highest-grossing of all time in China. Chinese audiences also love Mr Cameron's “Titanic”: the newly released 3D version took $105m in its first two weeks of release, double the takings in North America over the same period. But Hollywood's dealings with China have been marred by allegations of corruption. On April 24th Reuters reported that America's Securities and Exchange Commission had launched an investigation into whether American studios made illegal payments to Chinese officials.

China is difficult in other ways too. From the language barrier to hiring the cast (a percentage of whom must be Chinese), studios must adapt and some try to avoid offending China, even when their films are not co-productions. The invading army in a remake of “Red Dawn”, an American film, was changed from Chinese to North Korean in post-production.

But making a film that Chinese and Western audiences both want to watch is tricky. The 2010 remake of “Karate Kid” swapped Japanese karate for kung fu, yet the film performed badly in China, where audiences did not warm to a bully-boy depiction of the Chinese. And what will the need for Chinese-government approval do to the quality of co-productions made for the American market?

Dan Mintz, head of DMG Entertainment in Beijing and co-producer of “Iron Man 3”, describes China as both Hollywood's saviour and its worst nightmare. Co-productions will not necessarily be filmed in China. The key is that Chinese producers will provide funding. But co-produced films are scrutinised by censors at both script and post-production stages. Films must comply or risk being bounced from cinemas, which would be business suicide in a market where nine-tenths of revenue comes from box-office receipts (in America, it is closer to 30%).

Government rhetoric suggests that the fledgling domestic market needs protection from American imports, at least long enough for it to grow in strength. Shanghai Film Group's 3D remake of “Havoc in Heaven”, starring one Monkey King, was released in January and made just $8m at the box office. DreamWorks Animation's “Kung Fu Panda 2” made more than $90m. The mouse may be commercially mighty, but the monkey has bureaucrats. And, for the time being, they are stronger.