The UK and EU have reached an agreement on a Brexit transition deal.

The UK has agreed to a contentious "backstop solution" which would keep Northern Ireland signed up to EU rules in order to avoid a hard border with the Irish Republic.

Britain will stay in the single market and customs union for 20 months after it leaves the EU in March 2019.

Britain will be able to sign new free trade deals during the transition — but they won't come into effect until after the period has ended.

LONDON — The United Kingdom and European Union have reached a political agreement on the terms of a post-Brexit transition deal after the UK agreed to a "backstop solution" which would keep Northern Ireland signed up to EU rules after Brexit.

British and EU negotiators agreed on Monday morning the broad terms of a 20-month transition phase which will take effect when Britain leaves the bloc in March 2019.

"We have reached an agreement on the transition period," the EU's chief Brexit negotiator Michel Barnier told a press conference at lunchtime on Monday.

Under the terms of the deal, Britain will remain in the single market and customs union until the end of 2020. It will also remain under the jurisdiction of the European Court of Justice, meaning it must continue abiding by all EU rules.

"The UK will no longer participate in EU decision-making processes. It will preserve all the benefits and advantages of the single market, customs union and of European policy, and will be required to respect EU rules," Barnier added.

The agreement was reached after the UK agreed to most of the terms of the European Commission's draft Withdrawal Agreement, which sets out the terms of Britain's divorce from the EU.

The document, originally published in February, included a suggestion that Northern Ireland could stay in the customs union and remain aligned with single market rules, in order to avoid physical infrastructure on the border between north and south Ireland.

The EU proposed that as the "backstop" option which would not take effect unless the UK government fails to produce an alternative solution for avoiding a hard border.

The UK had initially resisted legally agreeing to that backstop solution — called "Option C" — but an updated version of the draft legal text for the Withdrawal Agreement published on Monday showed the UK has now agreed to it.

"We agreed today that backstop solution must form part of legal text of withdrawal agreement... the backstop will apply until another solution is found," Barnier said.

Earlier in March, May said no British prime minister could agree to the proposal.

Watch: Barnier announces "decisive" step in negotiations

The EU's chief negotiator Michel Barnier has said there has been a "decisive step" towards the UK's withdrawal from the European Union pic.twitter.com/gppTOdoyoJ — Sky News (@SkyNews) March 19, 2018

Brexit secretary David Davis Davis said the agreement showed the UK had "taken another significant step."

"Our teams have worked hard and at pace to secure the terms of a time-limited implementation period that gives a certainty to businesses and citizens," he said.

He confirmed the UK will be able to sign new trade deals during the transition phase, which would come into force when that period ends.

EU leaders are expected to approve the transition deal and pass it to the European Parliament for legal approval at a European Council summit in Brussels later this week.

The pound appreciated on the news, with sterling climbing as high as 1.4089 against the dollar, a gain of almost 1%, and its highest level in over a month.