How to keep the Irish border free-flowing has proved to be the toughest issue to resolve in negotiating Britain's exit from the European Union.

The Brexit deal between London and Brussels - overwhelmingly rejected this month by British MPs - contains a so-called backstop provision ensuring that if all else fails, the border will remain open.

The boundary on the island of Ireland between Northern Ireland and the Republic is currently free from infrastructure.

London, Brussels, Dublin and Belfast all want it to stay that way, but making this compatible with Brexit is a circle yet to be squared.

Why is this an issue?

Both the UK and Ireland are EU member states. After the UK leaves, the Irish border will become an EU external frontier.

Because the British government aims to leave the EU's customs union and single market, checks would be required on products coming in and out.

Britain, Ireland and the EU have pledged to avoid any physical infrastructure, or "hard border".

Many fear it could upset the delicate peace process that ended decades of sectarian violence in Northern Ireland.

Taoiseach Leo Varadkar on Friday warned that Britain leaving without an official deal could lead to "people in uniform" being stationed on the border.

Residents and businesses on both sides of the 500km frontier also emphasise the importance of maintaining the free flow of trade and passenger traffic.

What was agreed? 

The withdrawal agreement concluded in December - rejected last week by British MPs - included a position of last resort on the Irish border, intended as a guarantee.

London and Brussels aim to strike a permanent trade deal in the time between Britain leaving the EU on 29 March and the end of 2020, when the transition period covered by the withdrawal agreement runs out.

But if that proves impossible, Britain would remain aligned with the EU customs union after 2020, while Northern Ireland would further stay aligned to some single market rules, in order to keep the Irish border open.

Neither London nor Brussels can end the arrangement unilaterally.

Theresa May's Conservative minority government is propped up by the DUP. Many Conservative MPs and the DUP have rejected the draft deal.

They argue it would effectively carve off Northern Ireland from the rest of the UK by giving it a different economic status, and hamper free trade deals with other countries.

Where do key players now stand?

European states will not agree to any arrangement that undermines the EU's cherished single market.

Polish Foreign Minister Jacek Czaputowicz floated putting a five-year time limit on the backstop, but Tánaiste and Minister for Foreign Affairs Simon Coveney rejected the idea.

The DUP will not accept Northern Ireland following trade rules set by the EU, or new barriers to mainland Britain.

As Britain will be unable to leave the arrangement without the EU's say-so, Conservative Brexiteers fear being permanently trapped in EU structures.

They have been encouraged by recent comments from Michel Barnier, the EU's chief Brexit negotiator.

Mr Barnier said last Wednesday that "we will have to find an operational way of carrying out checks and controls without putting back in place a border" in the event of a no-deal, raising questions about the backstop's necessity.

But Brussels is unenthusiastic about tinkering with the Brexit deal.

Is there a security risk? 

British and Irish army checkpoints along the border were removed after the 1998 Good Friday Agreement.

During The Troubles, the border was a flashpoint for attacks and a lucrative smuggling route that helped fund paramilitaries.

Police have warned that any new infrastructure along the border could become a target for paramilitary activity by dissident militants who did not sign up to the peace deal.

A car bomb in Derry this month, being blamed on dissidents, emphasised that the threat has not gone away.