Boris Johnson has opened talks with rebels in the U.K.’s ruling Conservative Party in an attempt to win their support for his controversial plan to override the Brexit deal he struck with the European Union.

The prime minister is facing a revolt from Tories dismayed at his proposal to break international law by unilaterally re-writing parts of the Brexit Withdrawal Agreement he signed with the EU last year.

Johnson and other senior government figures held talks with one leading rebel in the party -- Bob Neill -- on Monday, but officials are still braced for an ugly fight over the proposals next week, people familiar with the matter said.

The prime minister’s Internal Market Bill passed its first parliamentary hurdle on Monday, but Neill and a dozen other Conservatives are trying to amend it to require the government to seek approval from MPs before exercising the most controversial powers the law will give it.

No deal has been done with the rebels yet, according to a person familiar with the situation, but Neill said Monday he wanted to give ministers the chance to address his concerns. A Downing Street official said the government was engaging with MPs in the normal way.

Johnson’s plan to rip up parts of the EU withdrawal agreement threatens to blow apart the delicate negotiations over a future trade deal between the bloc and the U.K. The talks are already stuck, with just over three months left to reach a solution, and the EU has threatened legal action if Johnson doesn’t back down. Failure to reach an accord by the year-end would leave the U.K. facing disruption to trade with its nearest neighbor and chaos at its ports.

The row erupted after Northern Ireland Secretary Brandon Lewis told MPs last week that the Internal Market Bill would break international law in “a limited and specific way.”

The government said the legislation aims to prevent the EU erecting trade barriers between mainland Britain and Northern Ireland if no agreement can be reached on future arrangements for the region.

But Lewis’s comments provoked a wave of anger. All five of Johnson’s living predecessors as prime minister have publicly expressed their concern at the damage his plan is doing to the U.K.’s international reputation as a reliable partner that respects the rule of law.

One government adviser resigned, and a cabinet minister has said he may do so if the law is broken eventually in a way he finds unacceptable.

Further confusion followed on Tuesday when one the U.K.’s top legal officials defended Johnson’s plans by insisting they don’t breach international law -- contradicting Lewis and the prime minister’s office.

Richard Keen, the Advocate General for Scotland, told the House of Lords the bill deals with a “contingent situation” in which the European Union would be in breach of its treaty obligations.

“The provisions of the bill are entirely limited in their intent and effect, and fall within the rule of law and the requirements of international law,” he said. “I certainly don’t anticipate that those provisions would be abused.”