Human rights lawyer Amal Clooney has resigned from her position as the U.K.’s special envoy on media freedom.

Clooney’s decision is in protest against the U.K.’s intention to pass the Internal Market Bill that is designed to ensure barrier-free trade between the four U.K. nations of England, Scotland, Wales and Northern Ireland after the Brexit transition period concludes Dec. 31. However, as Northern Ireland shares a border with the Republic of Ireland, which is part of the European Union, an aspect of the bill could see the U.K. break international law.

“I have been dismayed to learn that the government intends to pass legislation – the Internal Market Bill – which would, by the government’s own admission, ‘break international law’ if enacted,” Clooney wrote to U.K. foreign secretary Dominic Raab in her resignation letter.

The international law in question is the the U.K.’s EU withdrawal agreement, finalized a year ago, that states that goods travelling between Northern Ireland and the rest of the U.K. are subject to customs regulations after the end of the transition period. The Internal Markets Bill, if passed, will override the customs clause, thereby breaking international law.

“Although the government has suggested that the violation of international law would be ‘specific and limited,’ it is lamentable for the U.K. to be speaking of its intention to violate an international treaty signed by the Prime Minister less than a year ago,” Clooney wrote. “Out of respect for the professional working relationship I have developed with you and your senior colleagues working on human rights, I deferred writing this letter until I had had a chance to discuss this matter with you directly. But having now done so and received no assurance that any change of position is imminent, I have no alternative but to resign from my position.”

David Neuberger, chair of the High-Level Panel of Legal Experts on Media Freedom, of which Clooney is deputy chair, said: “I support her principled response to the shameful attitude of the U.K. government to its international treaty obligations in the Internal Markets Bill and in ministerial announcements that it is prepared to break international law.”