Media playback is unsupported on your device Media caption What is the EU customs union?

A customs proposal aimed at preventing a hard border in Ireland after Brexit has been agreed by cabinet.

Ministers signed off on the "backstop" that would see the UK match EU tariffs after 2020, if there is no deal on their preferred customs arrangements.

Brexiteers fear the proposal amounts to staying in the customs union longer.

No 10 says the UK would still be able to sign and implement trade deals, and the measure would only last for a matter of months.

The UK is due to leave the European Union in March 2019, after which a 21-month transition period is due to begin, which aims to smooth the way to a post-Brexit relationship between the UK and EU.

Government sources have told the BBC's political editor, Laura Kuenssberg, that the newly-agreed proposal was very unlikely to be needed - as they are confident a customs deal that avoids bringing back a hard border can be agreed with the EU.

Earlier, Irish PM Leo Varadkar said ensuring there was no hard border between the Irish Republic and Northern Ireland was "an absolute red line" for the Irish government.

"We need that [backstop] to be part of the withdrawal agreement, and if it's not, then there will be no withdrawal agreement and no transition period."

After meeting Mrs May at an EU summit in Bulgaria on Thursday, he said he expected the UK to table new proposals within weeks but warned: "Resolving the issue of avoiding a hard border requires more than customs."

Mrs May said they had held a "very constructive" meeting, adding: "The commission published a fallback option which was not acceptable to us and we will be bringing forward our own proposal for that fallback option in due course."

She also met European Commission President Jean-Claude Juncker, and European Council President Donald Tusk.

The government's new proposal is expected to be discussed formally in Brussels next week.

Image copyright EPA/PA Image caption Leo Varadkar will meet Theresa May at an EU summit in Bulgaria on Thursday

Ministers are yet to settle on what permanent model they want to see replace the customs union when the UK leaves the EU.

They are under pressure to decide on their policy before a key EU summit in June.

Labour Shadow Brexit Secretary Sir Keir Starmer called the situation "farcical", saying: "The government is fighting over two options, neither of which are going to work, neither of which are acceptable to the EU, and neither of which would have the support of the majority in parliament."

He added: "We need certainty and the right approach is to stay in a customs union with the EU as the long-term objective."

What are the custom options after Brexit?

The UK is due to officially leave the EU on 29 March 2019, with a transition period until the end of 2020 intended to smooth the way to the permanent new relationship.

But the two sides have just five months to get an agreement on post-Brexit trade, so it can be ratified before Britain leaves in March next year.

Key to this is how the UK and EU's customs systems will work together in years to come.

Currently, the UK is in the EU's customs union, which means member states all charge the same import duties to countries outside the EU.

It allows member states to trade freely with each other, without burdensome customs checks at borders, but it limits their freedom to strike their own trade deals.

The UK government has said it wants to leave the EU customs union in order to strike its own trade deals with other countries, promising trade will still be as "frictionless" as possible.

Please upgrade your browser Your guide to Brexit jargon Enter the word or phrase you are looking for Search

But ministers do not agree on how to replace it.

Brexiteers are against Mrs May's preferred option of a "customs partnership", under which the UK would collect tariffs set by the EU customs union on goods coming into the UK on behalf of the EU.

The alternative proposal would rely on technology and advance checks to minimise, rather than remove, customs checks. The EU has expressed doubts about whether either option would work.

On Wednesday, senior ministers acknowledged there has been "serious criticism" of both proposed models.