UK foreign secretary Dominic Raab has finally ended a corrosive diplomatic dispute over the status of the EU’s ambassador in London, a stand-off that had added to post-Brexit tensions.

Raab had previously refused to grant João Vale de Almeida full diplomatic status after Brexit took effect on January 1, arguing the EU was an “international organisation” not a state.

Brussels retaliated by shutting Britain’s head of mission to the EU, Lindsay Croisdale-Appleby, out of key meetings with EU officials, adding to Brexit tensions on trade and Northern Ireland.

But on Wednesday the issue was settled after a meeting between Raab and Josep Borrell, the bloc’s foreign policy chief.

Officials briefed on the deal said Vale de Almeida would now receive the same diplomatic recognition as his counterparts in EU missions in all other world capitals, including Washington and Beijing.

In a joint statement, issued at a G7 meeting in London, Raab and Borrell said they had reached an agreement based on “goodwill and pragmatism” on an establishment agreement for the EU delegation to the UK.

While Vale de Almeida will enjoy full ambassadorial status, British officials said Raab had secured a deal “which gives us some of what we want” regarding the legal situation of EU staff in London.

EU officials will enjoy a largely similar status to other diplomats but with some downgrades: notably, under the agreement, they will not have immunity from prosecution for road traffic accidents.

Raab insisted on this carve-out following the death of Harry Dunn, a British motorcyclist killed in 2019 in a collision with a vehicle driven by Anne Sacoolas, the wife of a US diplomat. She returned to the US claiming diplomatic immunity.

But many British diplomats were dismayed at how long it had taken to resolve the dispute. “It was a stupid thing to do in the first place and we’ve had to back down,” said one former ambassador.

The diplomatic rapprochement was hailed in Brussels as a sign of a “new cycle” in UK-EU relations following the European parliament’s formal ratification last month of the trade deal between the two sides, which took effect on January 1.

There has also been a thawing in relations over the management of tensions in Northern Ireland, as London and Brussels look for ways to soften border checks on goods coming from the British mainland to the region.

Vale de Almeida will now get to present his diplomatic credentials to the Queen — an honour not available to the heads of international missions.

Boris Johnson has never recognised the EU as equivalent in status to a national government but Number 10 insiders insisted that the Foreign Office — not the prime minister — was responsible for the diplomatic dispute.

Meanwhile, Ireland and the UK announced plans for the first meeting in two years of the British-Irish Intergovernmental Conference, a structure created under the 1998 Good Friday Agreement for the two countries to liaise on issues around Northern Ireland.

“We are aware that there are sincerely held concerns in different communities in Northern Ireland in relation to a number of issues and firmly agree that the best way forward is through dialogue and engagement,” said Northern Ireland secretary Brandon Lewis and Ireland’s foreign affairs minister Simon Coveney in a joint statement after they met in Dublin on Wednesday afternoon.

The meeting will take place in June, ahead of the July marching season in Northern Ireland, which could inflame tensions between unionists — who feel that their region’s status in the UK is under threat from post-Brexit trading arrangements — and nationalists, who are pushing for a vote on a united Ireland.