THE EU deal struck by Boris Johnson would be unlawful and should not be voted on by MPs, a new legal challenge submitted to the Court of Session argues.

This morning it emerged that the EU and Prime Minister had come to an agreement on a new deal for Brexit ahead of key summit starting today in Brussels. 

Good Law Project founded Jolyon Maugham QC, who worked on the Cherry case against Johnson's prorogation of Parliament earlier this year, said he will submit the emergency challenge to Scotland's highest civil court. 

He said the agreement is unlawful under legislation put forward by the Tories' Brexiteer European Research Group (ERG). 

The National: Joanna Cherry has led a previous case against the PM's prorogation of Parliament Joanna Cherry has led a previous case against the PM's prorogation of Parliament

The EU's chief negotiator Michel Barnier revealed the deal means Northern Ireland will stay in the UK's customs territory but the island of Ireland will be aligned to some EU rules, meaning goods will be checked on entry to the island rather than border checks between Northern Ireland and the Republic.

Explaining his legal objections to the agreement, due to be debated in a special Westminster sitting on Saturday, Maugham said it contravenes legislation stating it is "unlawful for Her Majesty's Government to enter into arrangements under which Northern Ireland forms part of a separate customs territory to Great Britain".

Under the current law, Section 55 of the Taxation (Cross-border Trade) Act 2018 prevents Northern Ireland from having different customs rules than the rest of the UK, purportedly to "uphold the constitutional integrity of the United Kingdom and safeguard the Union for the future", according to a government briefing on the Bill.

After details emerged of the Brexit deal, Maugham - whose legal team also took action to try and ensure the Prime Minister obeys by the Benn Act - said: "I intend to launch an immediate petition for an injunction in the Court of Session preventing the Government from placing the withdrawal agreement before Parliament for approval."

He has said the petition is expected to be heard tomorrow, and added: "We do not understand how the Government might have come to negotiate a Withdrawal Agreement in terms that breach amendments tabled by its own European Research Group.

READ MORE: Brexit deal reached - but DUP say they won't back it

"Unless and until Section 55 is repealed by the UK Parliament, it is simply not open, as a matter of law, for the United Kingdom to enter into such an agreement.

"If the proposed withdrawal agreement is unlawful, the Government will be obliged to request an extension as mandated by the Benn Act and in accordance with undertakings given to the Court of Session in Vince, Maugham, Cherry v Boris Johnson."

Writing on Twitter, Maugham called on the Government not to present "an unlawful withdrawal agreement to Parliament" and instead request an extension under the terms of the Benn Act to allow MPs to consider - and make lawful - the deal.

Maugham added: "Here we are, after three and a half years, and it looks as though Parliament will be asked to approve on Sat a 500+ page document which it has not seen (indeed which does not yet exist) with epochal consequences for Great Britain, Northern Ireland and the EU and in short time.

"If the Government wants to seek Parliament's consent to repeal section 55, it can and should seek that consent.

"But it must not negotiate unlawful trade deals and then present them to Parliament as a fait accompli."

Maugham also argued the Government will prevent Parliament from having any say on future trade negotiations, "including those affecting the NHS".

He added: "That should cause deep alarm to all of us."