ON NOVEMBER 21st Boris Johnson, the foreign secretary, denied in Parliament that Britain’s loss of its place on the International Court of Justice (ICJ) was a failure. “It has been a long-standing objective of UK foreign policy to support India in the UN,” he insisted. That Britain wilted in the face of an Indian challenge, leaving it with no judge on the court for the first time since it was founded in 1946, was thus almost a success.

His answer put a creative gloss on an unhappy state of affairs. The ICJ has 15 judges; five are elected every three years for a nine-year term. Britain’s candidate, Sir Christopher Greenwood, was standing for re-election, and was widely expected to win.

That he did not partly reflects UN politics. Competition heated up after a popular former Lebanese ambassador decided to chance his luck, upsetting the balance of regional allocations to the court. The dominance of the five permanent members of the UN Security Council, including Britain, is increasingly contested. Sir Christopher is well regarded but carries baggage, having advised the British government on the Iraq war and acted as an arbitrator in a dispute between it and the Chagos islands that was recently referred to the ICJ by the UN.

Yet such problems ought not to have been insurmountable. That they were reflects other issues with Britain’s foreign policy, and its messenger. One observer says British diplomats lobbied hard but were undermined by their foreign secretary, who is known internationally for writing about the “watermelon smiles” of Africans and suggesting that Barack Obama’s Kenyan ancestry might have influenced his attitude to Britain.

Brexit is another problem. “A lot of people perceive us as being rather introspective,” and are confused about Britain’s intentions, says Sir Simon Fraser, a former head of the Foreign Office. Cutting the Foreign Office budget from £2bn ($2.6bn) this year to £1.2bn next is hardly going to help. Britain’s reluctance to take on India was also partly down to hopes for a trade deal on leaving the EU, a weakness other countries may exploit.

Britain’s allies declined to offer much support. America is said to have joined others in pulling the plug on a last-minute attempt to ensure Sir Christopher’s election. And Britain’s inability to carry the UN’s general assembly, whose approval judges need, points to less than unanimous backing from EU and Commonwealth countries.

Mr Johnson says that Brexit offers a chance to create a “global Britain” that strides beyond its “immediate European hinterland” and gets closer to the rising powers of the 21st century. Failing to retain its judge on the ICJ points to how hard that may prove.