A legal challenge will be brought against British Prime Minister Boris Johnson's possible Brexit deal on the grounds that it contravenes domestic tax law, lawyer Jolyon Maugham said on Wednesday.

Maugham, who has been involved in successful, high profile cases that challenge the government over plans to exit the European Union, said he intended to lodge a petition to stop the government putting the Withdrawal Agreement before parliament.

Britain and the EU appeared on the verge of a last-minute Brexit deal on Wednesday but Prime Minister Boris Johnson still had work to do at home to ensure his government and fractious parliament approve the plan.

Britain has proposed that tariffs would apply on goods crossing from mainland Britain to Northern Ireland if they were deemed to be headed further to Ireland and the bloc's single market, in a bid to resolve the tricky Irish border issue.

However, Maugham said he believed such a deal would contravene the Taxation (Cross-border Trade) Act 2018.

The act states that "it is unlawful Government to enter into arrangements under which Northern Ireland forms part of a separate customs territory to Great Britain."

Asked whether any mooted Brexit deal would fall foul of the law, Maugham told Reuters by email: "That's our belief, yes."

Maugham said that he hoped to lodge the petition on Thursday and for it to be heard on Friday.

Maugham has challenged the government successfully on its decision to suspend parliament and on whether Britain could unilaterally change its mind about leaving the EU.

He is also involved in a case which seeks to force Johnson to comply with a law to delay Brexit beyond Oct. 31 if he fails to agree a transition deal with the EU.