Prime Minister Boris Johnson on Wednesday said he had full confidence that Britain and the EU will avoid a potentially disastrous cliff-edge "no deal" at the end of this year.

But he refused to back down on controversial new legislation that he openly admits will break international law and which has put his government at loggerheads with Brussels.

The proposed law, which overrides parts of the Brexit treaty relating to trade in Northern Ireland, could torpedo already fraught trade talks with the European Union.

A handout photograph released by the UK Parliament shows Britain's Prime Minister Boris Johnson speaking during Prime Minister's Questions in the House of Commons in London on Wednesday.
A handout photograph released by the UK Parliament shows Britain's Prime Minister Boris Johnson speaking during Prime Minister's Questions in the House of Commons in London on Wednesday. UK PARLIAMENT / JESSICA TAYLOR

The prospect of a "no deal" is looming larger with the talks deadlocked, and both sides insisting agreement must be struck by next month for it to be implemented at the end of the year.

Johnson told MPs that a "no deal" was "not what this country wants and it's not what our EU friends and partners want from us".

"Therefore I have every hope and expectation that that will not be the outcome," he told a parliamentary committee during more than two hours of questioning.

Britain's Prime Minister Boris Johnson leaves 10 Downing Street in London on Wedneday to attend the weekly Prime Minister's Questions (PMQs) session in the House of Commons.
Britain's Prime Minister Boris Johnson leaves 10 Downing Street in London on Wedneday to attend the weekly Prime Minister's Questions (PMQs) session in the House of Commons. AFP / Tolga AKMEN

The UK Internal Market Bill was put before parliament this week, despite EU calls for it to be withdrawn and stark reminders of the need to uphold treaty obligations.

Johnson has claimed the EU could "blockade" food and agricultural products heading to Northern Ireland from mainland Britain by imposing higher duties and tariffs.

Northern Ireland will have Britain's only land border with the EU from January 1, and remains bound by some EU rules to ensure its border with Ireland stays open.

EU chief Ursula von der Leyen complains that hopes of a post-Brexit trade deal are fading and warns Britain that its attempts to modify its withdrawal agreement are illegal.
EU chief Ursula von der Leyen complains that hopes of a post-Brexit trade deal are fading and warns Britain that its attempts to modify its withdrawal agreement are illegal. EBS

An open border was a key requirement of the 1998 Good Friday Agreement that brought an end to more than 30 years of violence over British rule in Northern Ireland.

Johnson said EU officials had "signally failed" to rule out preventing goods reaching Northern Ireland from Britain if no trade agreement is made.

"It's always possible that I'm mistaken and perhaps they will prove my suspicions wrong," he said.

The bill was designed as a "belt and braces" measure to regulate trade within the UK, and an "insurance policy" against any extreme action, he added.

Advocate General for Scotland Richard Keen, shown in London a year ago, resigned on Wednesday from his post of Advocate General for Scotland in the UK government
Advocate General for Scotland Richard Keen, shown in London a year ago, resigned on Wednesday from his post of Advocate General for Scotland in the UK government AFP / Tolga AKMEN

"I prefer to have protections that guarantee the integrity of this country and protect against the potential rupture of the United Kingdom," he said.

A "no deal" outcome to the talks would see tariffs imposed by both sides, and on Britain's side, they "would be quite formidable for some of their products", he added.

EU chief executive Ursula von der Leyen earlier said the divorce deal that allowed Britain to leave the bloc could not be "unilaterally changed, disregarded or misapplied".

"This is a matter of law and trust and good faith," the European Commission president said in a speech, warning the chances of securing a trade deal were fading.

EU leaders have dismissed Johnson's claims as "spin", while the ramifications of the government's admission the bill would break the law rumbled on.

Several of Johnson's own Conservative MPs have spoken of their unease, while every living former prime minister has warned of the risk to Britain's global reputation.

US Democrats said any US-UK trade deal would unlikely get through Congress if it was seen to threaten the Good Friday Agreement.

In another blow for the government, its most senior law officer for Scotland, Richard Keen, quit amid reports he opposed the plans to flout the Brexit Withdrawal Agreement.

Further votes on the bill are expected in parliament next week, but the government agreed to a compromise with Tory rebels.

It said it would allow MPs a vote before using powers which would break international law, according to a joint statement from Johnson's office, and two senior Conservatives.