The UK has u-turned over its refusal to grant diplomatic status to the EU's ambassador amid Brexit tensions.
Joao Vale de Almeida took up his post as Brussels' first Ambassador to the UK last year but he was denied formal recognition by Britain during the fractious Brexit trade talks.
The move stoked tensions with Brussels, prompting the EU to shut the UK's envoy out of meetings.
But the UK has now ditched its bullish stance and will grant the top diplomat protections such as immunity from detention, prosecution and taxation.
In a joint statement on Wednesday, Foreign Secretary Dominic Raab and EU High Representative and Vice President of the Commission, Josep Borrell, said: "We are pleased to have reached an agreement together, based on goodwill and pragmatism, on an establishment agreement for the EU delegation to the UK."
The thawing in relations came after the European Parliament approved the post-Brexit trade deal last week – more than four months after the agreement was struck on Christmas Eve.

But another Brexit row threatened to boil over after France threatened to turn Jersey's electricity off in a row over fishing rights.
The Channel Island blasted Paris for making "disproportionate" threats after French maritime minister Annick Girardin accused Jersey of dragging its feet over issuing new licences to French boats.
A UK Government spokesman said: "To threaten Jersey like this is clearly unacceptable and disproportionate.
"We are working closely with the EU and Jersey on fisheries access provisions following the end of the transition period so trust the French will use the mechanisms of our new treaty to solve problems."
It comes as Brussels' chief Brexit negotiator Michel Barnier said Britain's post-Brexit future was the result of "the quarrels, low blows, multiple betrayals and thwarted ambitions of a certain number of Tory MPs".
He accused British politicians of "talking to themselves" and said the result was "political piracy".

In extracts from his new diaries reported in The Guardian, he described Boris Johnson as "advancing like a bulldozer, manifestly trying to muscle his way forwards" without fully understanding the legal complexities of the negotiations.
Mr Barnier said Theresa May was "a courageous, tenacious woman surrounded by a lot of men busy putting their personal interests before those of their country".
But in the end she "exhausted herself, in a permanent battle with her own ministers and with her parliamentary majority", he said.
He described Dominic Raab, who became Brexit secretary, as "almost messianic".
And he slammed Mr Johnson's "derisory... almost infantile" threats to walk away from trade talks.
"They will go to any length. The current team in Downing Street is not up to the challenges of Brexit nor to the responsibility that is theirs for having wanted Brexit. Simply, I no longer trust them," he wrote.