O N THE NIGHT before Christmas Eve last year Zhang Jianmin, China’s ambassador to the Czech Republic, paid a visit to Andrej Babis, the prime minister, on the outskirts of the capital. The two men posed for a photograph by a Christmas tree, but it was not a social call. Mr Zhang objected to a security warning about Huawei and ZTE that had been issued by the country’s cyber-security agency, and complained that Mr Babis had banned his staff from using products made by the two Chinese telecoms giants. Mr Zhang emerged claiming, in a statement posted on Facebook, that Mr Babis had assured him that the security warning had been “misleading” and the ban hastily decided. It seemed briefly like a Chinese diplomatic victory in Europe.

It was, instead, another in a series of bumbling missteps by China that have left it foundering diplomatically in the Czech Republic. Humiliated by the statement, Mr Babis publicly contradicted Mr Zhang, saying flatly, “I do not know what the ambassador is talking about.” The limited Huawei ban, imposed by Mr Babis and some government ministries, stayed in place. A years-long effort to influence the political and business elite of the Czech Republic, and to turn the foreign policy of an EU member country, was unravelling.

Officials in Western democracies have grown anxious in recent years at China’s increasing dexterity at exerting influence far from its shores. But China’s experience in the heart of Europe suggests its diplomatic playbook is much trickier to execute in a democracy with a free press and fairly strong institutions—and perhaps especially one, like the Czech Republic, that has a historical sensitivity to being pushed around by an authoritarian great power. “It is a story of backlash,” says Martin Hala of Sinopsis, which has monitored the rise and fall of Chinese influence in the country.

In its courtship of the Czech Republic, China has employed many of the same tactics it has honed elsewhere. It has courted public figures (including by putting some on the payroll), promised substantial investment, sponsored cultural programmes and events, and applied diplomatic pressure when necessary. Analysts call the process “elite capture”.

For a few years it appeared to be working. In 2013 Milos Zeman, a former prime minister, was elected president. Though the president does not set official Czech foreign policy, he pursued a friendly relationship with Xi Jinping. That same year Petr Kellner, a Czech billionaire oligarch and supporter of Mr Zeman’s, won a coveted Chinese national licence for one of his companies, Home Credit, to make consumer loans. In 2014 Huawei entered into a five-year sponsorship contract with Prague Castle, the presidential residence, agreeing to supply Mr Zeman and his office with servers, phones and other equipment worth about $20,000 annually.

In 2015 CEFC China Energy, an oil conglomerate, announced that it would invest billions of dollars in the Czech Republic. It snapped up stakes in a football club, a brewery and a hotel, and a few other businesses, including a little-watched TV station. In 2016 China’s influence seemed to be reaching an apex, with a state visit by Mr Xi himself.

But then cracks started to appear. In 2018 Ye Jianming, the CEFC chairman, was detained in China on suspicion of corruption. Beyond the initial flurry of deals, CEFC ’s largesse never materialised.

A nastier side also began to show. In 2016, after the Czech culture minister met the Dalai Lama, a diplomatic no-no for China, Mr Zeman abruptly cancelled plans to award a medal to the minister’s 88-year-old uncle, a Holocaust survivor. This year Chinese authorities tried to press the mayor of Prague, an outspoken critic of China’s human-rights record, into adhering to the “one-China” principle that forbids diplomatic relations with both China and Taiwan. When he refused, Chinese authorities cancelled a long-planned tour of China by Prague’s Philharmonic Orchestra.

Investigative journalists have caused more problems. In July Czech public radio reported that Huawei employees in Prague were supplying information about their clients to the Chinese embassy. In November Charles University closed its Czech-Chinese Centre, which had been hosting China-friendly conferences since its opening in 2016, after a news website reported that its executive secretary, and others, had taken payments from the Chinese embassy via a private company.

For now China’s efforts at “elite capture” seem to have alienated the public. In a global survey conducted this year by the Pew Research Centre, 57% of Czechs viewed China unfavourably, compared with just 27% who viewed it favourably—the widest negative margin of any country surveyed in Europe apart from Sweden.