“WHY has the external environment changed?” asks a Chinese scholar of international relations in Beijing, pondering a bad few months for Chinese diplomacy. Nothing big has changed in China, nor has its own foreign policy shifted. Yet it has lurched from quarrel to quarrel with all its most important partners. The temptation for Chinese nationalists is to see their country as the victim of a Western conspiracy to keep China down, just as it is beginning to take its rightful place in the world. A more plausible explanation may be the ineptness of Chinese diplomacy, made up so often of hectoring and threats.

Exhibit one for China's conspiracy theorists is the award of the Nobel peace prize to Liu Xiaobo, a jailed activist. Global Times, a party newspaper, said the award ceremony marked the beginning of a “trial by history against the Nobel committee”. But it was China itself that, rather than loftily ignoring the perceived slight, turned attendance in Oslo on December 10th into a with-us-or-against-us test of friendship. By this misleading benchmark, most of those invited were against. Some, such as India, had to withstand concerted Chinese arm-twisting.

The 17 countries that heeded China's boycott call hardly justified its claim that most countries backed its stand. Some, like Vietnam, might have liked to see China embarrassed, but would certainly stand up for a government's sovereign right to lock up peaceful dissidents. So would Cuba and Iran. A few others, like Pakistan, are “all-weather friends”. The only real surprise was the Philippines, which is proud of its democratic freedom. But its foreign ministry was anxious to placate China after a botched hostage rescue in August, in which eight tourists from Hong Kong were killed. Even so, the Philippine president's office pleaded a “scheduling conflict” for his ambassador. The local press has pilloried the government for its timidity.

Official Chinese commentators have repeatedly called the prize-giving a “farce”. The word would be more accurately applied to the award in Beijing on December 9th of the first-ever “Confucius peace prize”. The winner was Lien Chan, a former vice-president of Taiwan, much liked by the Chinese government for his conciliatory approach. Mr Lien, claiming he was unaware of the prize, was, like Mr Liu, unable to receive it. In his absence, it was given to an “angel of peace”, a six-year-old girl who found herself cuddling a bundle of 100,000 yuan ($15,000) in cash. This has not gone down well in Taiwan, one of the few places where Chinese policy has recently seemed quite successful (perhaps because China sees Taiwan as a domestic problem).

Elsewhere, China has antagonised America, Japan and South Korea by refusing to condemn North Korea for its attacks on the South. It had already alienated a friendly government in Japan by its aggressive response to the detention in September of a Chinese trawler captain who rammed a Japanese coastguard vessel. It has succeeded in uniting many of the littoral states in the South China Sea against its high-handed refusal to discuss its territorial claims there. In November it even picked a fight with the Vatican, by ordaining a bishop not endorsed by the pope and forcing some of his bishops to attend.

Maybe China has decided that, contrary to its own protestations, it does not really need smooth foreign relations. Or maybe its diplomacy is a mess. The Chinese scholar offers three possible explanations. One is the confusing proliferation of “non-diplomatic” bodies and special-interest groups in foreign policy, from oil firms to the army to, in the case of Japan, the marine affairs and fisheries bureaus. But the other two may be more telling: the increasing importance of Chinese public opinion and the absence of any senior political figure in charge of foreign policy. The foreign minister, Yang Jiechi, is not a member of the Communist Party's 25-member Politburo, let alone its nine-member, decision-making Standing Committee. There is nobody to thump the table for foreign relations. Abroad does not matter very much.

At least, however, China's threats often prove hollow. Despite India's refusal to kowtow over the dissident Mr Liu, for example, China's prime minister, Wen Jiabao, went ahead this week with his planned visit to India. And China has confirmed that America's defence secretary, Robert Gates, is to visit in the new year, ending a freeze on high-level military contacts imposed last January after America sold arms to Taiwan. Little has been heard since of the commercial sanctions against American firms that China threatened at the time.

My name is Liu

Indeed, for all the threats and vituperation directed at foreign governments, it is mostly Chinese citizens who suffer. At home, the authorities' bite is as bad as their bark. They fear organised protest and dissent far more than foreign embarrassment. Mr Liu's wife has been kept incommunicado. Human-rights groups say hundreds of people were interrogated or detained ahead of the Nobel ceremony. Many were prevented from leaving the country, lest they turn up in Oslo. News of the ceremony there was largely blacked out.

Even in China, however, the government is not having things all its own way. As reported by Danwei, which monitors the Chinese media, microbloggers have been posting eulogies to “the people they admire most”, who happen to be named Liu, and whose lives echo the Nobel prize-winner's: a table-tennis player, a famous actress, a champion hurdler, a Cantopop star and Liu Shaoqi, a former president hounded to his death during the Cultural Revolution. “He was unjustly accused and spent many years in prison,” read the post, by a writer who, like Global Times, takes the long view. “But I believe that all of this is but the test of history, because he said that, fortunately, history is written by the people.” Not if the party can help it, it isn't.

Economist.com/blogs/banyan