The UK is to lose its seat on the International Court of Justice for the first time since the United Nations’ principal legal body began in 1946.
Sir Christopher Greenwood was hoping to be elected for a second nine-year term on the bench of 15 judges in the Hague.
The government withdrew his candidacy after six rounds of votes with India’s Dalveer Bhandari ended in a deadlock.
Sir Christopher was backed by the UN Security Council but his rival was chosen by the General Assembly.
A successful candidate needs to gain a majority of support in both bodies.
The UK’s move means Mr Bhandari will be able take up a position on the ICJ, alongside four other judges already elected.
The UK government had considered invoking a little known arbitration process but in the end chose to take Sir Christopher out of the race.
The British ambassador to the UN, Matthew Rycroft, said he was “naturally disappointed”.
Mr Rycroft said: “The UK has concluded that it is wrong to continue to take up the valuable time of the Security Council and the UN General Assembly with further rounds of elections…
“If the UK could not win in this run-off, then we are pleased that it is a close friend like India that has done so instead. We will continue to cooperate closely with India, here in the UN and globally.”
He said the UK would continue to support the work of the ICJ “in line with our commitment to the importance of the rule of law in the UN system and in the international community more generally”.
Shift in power
France and Russia, which along with the UK, US and China make up the permanent members of the UN Security Council, have also lost positions recently on UN bodies.
BBC diplomatic correspondent James Landale said the UK’s withdrawal of its ICJ candidate will be seen by some as a shift in the balance of power at the UN away from the Security Council.
He added the move will also be viewed as a humiliating defeat for the UK and a symbol of its reduced status on the international stage, as well as a failure of diplomacy.
Our correspondent said Mr Rycroft appeared to be hinting the UK had backed down to avoid damaging its relations with India, adding the fact that many countries were willing to defy the UK by supporting a judge from another country would have been less likely a few years ago.
Many members on the General Assembly, which contains representatives from all UN countries, are said to have come to resent the way the Security Council has so much power, particularly the five permanent members.
The so-called Group of 77 – which represent a coalition of mostly developing nations – has long been pushing for greater influence.