London CNN — Britain and the EU have reached an agreement on new trade rules in Northern Ireland, two government sources told CNN, in an attempt to resolve a thorny issue that has fueled post-Brexit tensions in Europe and on the island of Ireland. Commission President Ursula von der Leyen arrived in the UK Monday for final talks with British Prime Minister Rishi Sunak, ahead of a statement about the deal in the House of Commons. Von der Leyen will also meet with King Charles III for tea at Windsor Castle, Buckingham Palace confirmed. Negotiations intensified in recent weeks, after months of impairment over how to handle border checks in Northern Ireland, which is part of the UK but shares a land border with the Republic of Ireland, an EU member state. Now that a deal is done, Sunak faces a political backlash from hardline Euroskeptics in his Conservative Party. Von der Leyen’s meeting with the King has proved controversial. “The King is pleased to meet any world leader if they a re visiting Britain and it is the Government’s advice that he should do so,” the Palace said when it announced the sit-down. According to a royal source, the meeting would be an opportunity for King Charles to discuss topics including the war in Ukraine and climate change. But it was criticized by some prominent unionist figures.” I cannot quite believe that No 10 would ask HM the King to become involved in the finalizing of a deal as controversial as this one,” former Northern Ireland First Minister Arlene Foster wrote in a tweet. “It’s crass and will go down very badly in NI.” A new deal would update the arrangements known as the Northern Ireland Protocol, signed with Brussels by former Prime Minister Boris Johnson, which attempted to recognize the delicate situation that Brexit created in Northern Ireland. Ordinarily, the existence of a border between an EU member state and a non-EU nation like the UK would require infrastructure such as customs posts. But during the period of sectar ian strife known as the Troubles, security posts along the border between Northern Ireland and the Republic of Ireland became a target for paramilitary groups fighting for a united Ireland. In theory, the Northern Ireland Protocol was intended to do away with the need for border infrastructure . It was agreed that Northern Ireland would remain within the EU’s regulatory sphere, and that goods entering Northern Ireland from Great Britain would be checked before they arrived – effectively imposing a sea border. That enraged the pro-British unionist community in Northern Ireland, w argued they were being cut off from the rest of the UK and forced closer to the Republic. Disputes about the arrangements, in part, have been a barrier to the restoration of the Northern Ireland Assembly, which has been suspended since 2017. The sharing of power between unionists and republicans is a key part of the Good Friday Agreement – the peace deal that marked the end of the Troubles. The wrangling has a lso affected trade between Great Britain and Northern Ireland to the extent that the UK has not fully implemented the protocol.