The EU said on Wednesday that British-ruled Northern Ireland could stay part of a customs union with the bloc after Brexit if a better solution is not found.

Britain must commit to the possibility of Northern Ireland staying in the EU customs union under the authority of the European Court of Justice, according a draft Brexit treaty proposed by the European Commission.

The "backstop" proposal in a draft Brexit withdrawal agreement unveiled by EU negotiator Michel Barnier is set to stoke fresh tensions between London and Brussels.

Britain says it opposes anything that would effectively create an internal border in its territory, but Barnier insisted it did not threaten UK sovereignty.

The 120-page agreement says that in the absence of another plan, "a common regulatory area comprising the Union and the United Kingdom in respect of Northern Ireland" would be set up.

"The common regulatory area shall constitute an area without internal borders in which the free movement of goods is ensured and North-South cooperation," it says.

Ireland and the EU have called for any Brexit agreement to avoid a hard border including customs checks, in order to protect the 1998 Good Friday agreement in Northern Ireland, which ended three decades of bloody sectarian violence.

Britain says it wants a technological solution without staying in the customs union.

Barnier meanwhile warned that talks in Britain's departure in March 2019 must accelerate in order to succeed.

The treaty attempts to set out details of the Brexit withdrawal deal that May and European Commission Chief Jean-Claude Juncker sealed in principle after marathon talks in December.