Theresa May has said she will uphold the rights enshrined in the Good Friday Agreement and will work to secure a Brexit deal that avoids a hard border with Ireland.

In a speech in Belfast she said: "I'm here today to affirm my commitment, and that of the UK Government, to all of the people of Northern Ireland, of every background and tradition."

READ MORE: Theresa May to visit Brussels on Thursday for Brexit showdown with Jean-Claude Juncker 

She added that she was committed to the Good Friday Agreement and its successors.

She said she wanted to "affirm my commitment to delivering a Brexit that ensures no return to a hard border between Northern Ireland and Ireland, which is unshakeable".

Theresa May said that while she had tried to make the case for the Withdrawal Agreement, she had had to accept it would not get through Parliament in its current form.

"I fought hard to make the case for the deal as it stands," she said.

"I believed it could command a majority in the House of Commons but I have had to face up to the fact that in its current form it cannot and the need for changes to the backstop is the key issue.

"While there were those in Northern Ireland who favoured it, it is also true that the backstop is not supported by the two main Unionist parties here and it also influenced MPs in England, Scotland and Wales in voting against the deal."

The Prime Minister acknowledged the importance of a seamless border and how the current arrangements had helped "deliver peace and prosperity".

READ MORE: Neil Mackay: May must now abort her Brexit kamikaze mission 

She said: "While I have said that technology could play a part and that we will look at alternative arrangements, these must be ones that can be made to work for the particular circumstances of Northern Ireland."

Mrs May added: "Northern Ireland does not have to rely on the Irish Government or the European Union to prevent a return to borders of the past.

"The UK Government will not let that happen. I will not let that happen."

Former Northern Ireland first minister Lord Trimble said he is considering a legal challenge to the backstop elements of the EU Withdrawal Agreement over concerns about its impact on the Good Friday Agreement.

READ MORE: Brexit: Former Northern Ireland First Minister considering legal action over Withdrawal Agreement 

He told BBC Radio 4's Today programme: "We are exploring this possibility and we are concerned at the way in which the Withdrawal Agreement that our Prime Minister agreed actually turns the Belfast Agreement on its head and does serious damage to it."

With the backstop aimed at preventing the return of a hard border in Ireland, Lord Trimble stated: "The problem here is nobody has ever defined what a