HOW many rankings of global power have put Britain at the top and China at the bottom? Not many, at least this century. But on July 14th an index of “soft power”—the ability to coax and persuade—ranked Britain as the mightiest country on Earth. If that was unexpected, there was another surprise in store at the foot of the 30-country index: China, four times as wealthy as Britain, 20 times as populous and 40 times as large, came dead last. Diplomats in Beijing won’t lose too much sleep over the index, compiled by Portland, a London-based PR firm, together with Facebook, which provided data on governments’ online impact, and ComRes, which ran opinion polls on international attitudes to different countries. But the ranking gathered some useful data showing where Britain still has outsized global clout.

Britain scored highly in its “engagement” with the world, its citizens enjoying visa-free travel to 174 countries—the joint-highest of any nation—and its diplomats staffing the largest number of permanent missions to multilateral organisations, tied with France. Britain’s cultural power was also highly rated: though its tally of 29 UNESCO World Heritage sites is fairly ordinary, Britain produces more internationally chart-topping music albums than any other country, and the foreign following of its football is in a league of its own (even if its national teams are not). It did well in education, too—not because of its schools, which are fairly mediocre, but because its universities are second only to America’s, attracting vast numbers of foreign students.

Britain fared least well on enterprise, mainly because it spends a feeble 1.7% of GDP on research and development (South Korea, which came top, spends 4%). And the quality of its governance was deemed ordinary, partly because of a gender gap that is wider than that of most developed countries, as measured by the UN. Governance was the category that sank undemocratic China, whose last place was sealed by a section dedicated to digital soft-power—tricky to cultivate in a country that restricts access to the web. The political star of social media, according to the index, is Narendra Modi, India’s prime minister, whose Facebook page generates twice as many comments, shares and thumbs-ups as that of Barack Obama.

The index will cheer up Britain’s government, which has lately been accused of withdrawing from the world. But many of the assets that pushed Britain to the top of the soft-power table are in play. In the next couple of years the country faces a referendum on its membership of the EU; a slimmer role for the BBC, its prolific public broadcaster; and a continuing squeeze on immigration, which has already made its universities less attractive to foreign students. Much of Britain’s hard power was long ago given up. Its soft power endures—for now.