Brexit: What is the Irish border backstop?
A key part of the Brexit negotiations has been the border that separates Northern Ireland and the Republic of Ireland.
The border is a matter of great political, security and diplomatic sensitivity in Ireland.
Therefore the UK and EU agreed that whatever happens as a result of Brexit there should be no new physical checks or infrastructure at the frontier.
This is where the controversial "backstop" comes in.
Go on then, what is the backstop?
The backstop is a position of last resort, to maintain a seamless border on the island of Ireland in the event that the UK leaves the EU without securing an all-encompassing deal.
It would involve the UK retaining a very close relationship with the EU for an indefinite period.
The EU have insisted that any Brexit deal must contain the backstop.
Why might it be needed?
At present, goods and services are traded between the two jurisdictions with few restrictions.
That is because the UK and Ireland are part of the EU's single market and customs union, so products do not need to be inspected for customs or standards.
But, after Brexit, all that could change - the two parts of Ireland could be in different customs and regulatory regimes, which could mean products being checked at the border.
The preference of both sides is to prevent this happening through a deep and comprehensive trade deal.
However, the UK's current red lines, which include leaving the customs union and the single market, make that very difficult.
A technological solution for the border is favoured by many Brexit supporters but the EU are very sceptical about whether it can work without a degree of close regulatory alignment.
What if the trade deal or the technology aren't enough?
Then the backstop would be applied.
It would see Northern Ireland staying aligned to some rules of the EU single market.
That means that goods coming into Northern Ireland from elsewhere in the UK would need to be checked to see if they meet EU standards.
It would also involve a temporary single custom territory, effectively keeping the whole of the UK in the EU customs union.
These arrangements would apply unless and until both the EU and UK agree they are no longer necessary.
Why has this been so controversial?
In November 2018, then Prime Minister Theresa May said her cabinet had finally backed a deal between UK-EU negotiators that included agreement on a backstop.
This sparked a huge backlash from MPs at Westminster and several of her own ministers resigned in protest.
They feared that the backstop would be used to permanently trap the UK in the EU customs union, preventing the country from striking its own trade deals.
Some MPs said the backstop would only be acceptable if it had a strict time limit or if the UK had a unilateral right to end the arrangement.
The DUP, a Northern Ireland unionist party that props up Mrs May's minority government, also objected strongly saying it would not accept any additional Northern Ireland-only checks, because it is concerned that any differences between NI and Great Britain could threaten the union.
However business and farming groups in Northern Ireland urged support for the backstop saying it was an acceptable way to protect cross-border trade.
Non-unionist political parties in Northern Ireland also support the backstop.
However, Mrs May's failure to get parliamentary support for the backstop would ultimately lead to her resignation.
What does legal advice on the backstop say?
In March 2019 the EU and UK agreed a joint interpretation of the backstop, clarifying the earlier deal.
It explained the ways in which UK could start a "formal dispute" against the EU, if it tried to keep the UK tied into the backstop indefinitely.
It also emphasised that the EU would undertake joint work to find the technological solutions favoured by Brexit supporters.
This was intended to help Theresa May win parliamentary support for the backstop.
However her Attorney General, Geoffrey Cox, concluded that "the legal risk remains unchanged" that if a post-Brexit trade agreement cannot be reached due to genuinely "intractable differences", the UK would have "no internationally lawful means" of leaving the backstop without EU agreement.
What happens now?
Most of the candidates vying to become the next leader of the Conservative Party have said they will seek to negotiate changes to the backstop.
Matt Hancock favours a time limit, Michael Gove wants a clear exit mechanism, Boris Johnson wants to move border issues to the next phase of talks and several candidates have faith in a technological solution.
However the EU have so far given no signal that they will be willing to renegotiate.