THERESA May’s commitment to the Good Friday Agreement is being questioned after she attacked European leaders for effectively suggesting Northern Ireland remain in the customs market.

The Prime Minister said a draft withdrawal agreement published yesterday by Brussels that proposed Northern Ireland be considered part of the EU’s customs territory was not something she as a British prime minister could “allow”.

READ MORE: The UK is only experiencing the beginning of the Brexit chaos

The DUP’s Ian Paisley Jr called it an attempt by the EU to “annex a part of the UK and take it away from the governments of the rest of the UK.

EU chief negotiator, Michel Barnier, gave the British a stark ultimatum: there would have to be regulatory alignment between Europe and the UK, or a hard border in the Irish sea, because anything else would mean an end to the Good Friday Agreement.

According to the draft text, Northern Ireland being considered part of the EU customs market would be a “backstop” after everything else has been tried.

READ MORE: Brexit talks akin to 'pulling teeth', former Irish leader tells Alex Salmond

The draft paper says: “A common regulatory area comprising the union and the United Kingdom in respect of Northern Ireland is hereby established. The common regulatory area shall constitute an area without internal borders in which the free movement of goods is ensured and north-south co-operation protected.”

Barnier told reporters in Brussels: “This backstop will not call into question the constitutional or institutional order of the UK. We will respect that.

“We are just saying that on the island there are two countries. We need to fund the capacity for certain issues relating to the internal market and customs union, that we need to ensure the Good Friday agreement can function ... We need to ensure there is regulatory consistency, alignment.”

READ MORE: Holyrood set for second dramatic clash with Westminster over Trade Bill power grab

The draft, all 168 clauses, protocols and annex, is, effectively an attempt by Brussels to put into legal terms the agreement reached in December between London, Dublin and the DUP.

May was forced to use Prime Minister’s Question to deny that she and Boris Johnson didn’t care about the possibility of an Irish border.

A leaked letter from the Foreign Secretary, published on Tuesday night, seemed to suggest that a hard border wouldn’t be so bad, and that around 95 per cent of goods would still be able to cross.

May said: “The Foreign Secretary and I are absolutely committed to ensuring that we deliver no hard border between Northern Ireland and Ireland.

She added: “That’s the position of the UK Government, it’s the position of the parties in Northern Ireland, it’s the position of the Irish government, and it was what we agreed in the December agreement of that joint report.”

Scottish Brexit Minister Michael Russell said the UK had been caught out “making demands it knows the EU will reject”.

He said: “On Ireland, the Scottish Government remains absolutely committed to upholding the Good Friday Agreement in all its parts and we deplore any attempt to undermine this process. But as we have made clear previously, if it is possible for Northern Ireland to effectively remain in the single market or customs union, the case for Scotland also doing so becomes a practical necessity. Anything else would put Scotland at a huge competitive disadvantage when it comes to attracting jobs and investment.

“It beggars belief that 20 months on from the EU referendum and with little further time to agree a final deal, the UK Government has still not been able to set out what it wants from a future relationship with the EU.”

The EU proposal also states that the European Court of Justice will be the arbiter of disputes during the transition period.

Jacob Rees-Mogg, the chairman of the right-wing Brexiteer European Research Group (ERG) of backbenchers, said this would turn the UK into a “vassal state”.

The document states that the transition period will end after 21 months and that citizens arriving in the UK during that period should be treated the same as those who are already in the country.

An accompanying EU document to the draft withdrawal agreement also confirms that the UK will have to come to an agreement with Spain over the future of Gibraltar.