Media playback is unsupported on your device Media caption Customs union 'temporary staging post'

The DUP has held out the prospect of supporting a customs union as talks continue between Theresa May and Jeremy Corbyn to break the Brexit deadlock.

Sir Jeffrey Donaldson made the suggestion to BBC News NI on Wednesday evening.

It came as the Tory and Labour leaders agreed a "programme of work" to try to find a way forward to put to MPs.

Earlier, the DUP called the prime minister's handling of the overall Brexit negotiations "lamentable".

Late on Wednesday, MPs voted by a majority of one to force the prime minister to ask for an extension to the Brexit process, in a bid to avoid any no-deal scenario.

Earlier on Wednesday evening, Sir Jeffrey said his party would have preferred a form of Brexit that enables the UK to negotiate new trade agreements with other countries.

"That's part of the reason for Brexit and maybe a customs union might be a temporary staging post towards that objective," he told BBC Newsline.

"We will wait to see what the prime minister brings before Parliament but we are very clear, we want a Brexit that delivers for all of the United Kingdom and that keeps the United Kingdom together - that is our objective."

Please upgrade your browser Your guide to Brexit jargon Use the list below or select a button

The DUP MP earlier told BBC Radio Ulster that regardless of what emerges in the coming days, the DUP's stance on the union was "un-persuadable" and they remained in an "influential position" because of the government's fragile working majority in Parliament.

MPs have been debating legislation which would require Mrs May to seek an extension to Article 50 and give the Commons the power to approve or amend whatever was agreed.

Wednesday's knife-edge parliamentary vote to ask the EU for a longer Brexit extension was on a bill brought by Labour's Yvette Cooper.

It was fast-tracked through all Commons stages - a process that can take months - in one day and is now going through the Lords.

It will still be up to the EU to decide whether to grant an extension.

If the UK joined a customs union with the EU, this would lessen the need for the Irish border backstop, but would not remove it altogether.

On its own, a customs union would unequivocally not eliminate the potential for border checks in Ireland.

Customs are not the only things which could be enforced at the border - checks on food products to see if they meet EU standards would still remain an outstanding issue.

That is a matter that only some sort of continued single market access would grant.

On Monday, the DUP voted against an indicative vote proposing a customs union, but it was not binding.

If Mrs May and Mr Corbyn cannot agree a compromise, the government will put forward its own series of indicative votes - which will be binding - and could include Mrs May's own deal versus a series of other options.

Analysis: Enda McClafferty, BBC News NI political correspondent

Supporting one union to secure another. Might this be the new DUP tactic?

First, Nigel Dodds said he would rather remain in the EU than risk the union.

Now the party whip is saying a customs union "could be a temporary staging post" to the "preferred form of Brexit".

On the same day, the Attorney General Geoffrey Cox suggested he, too, could live with a customs union if it helped deliver Brexit.

For the DUP, it's about preserving the union first, delivering Brexit second.

But supporting a customs union in the political declaration, which is not legally binding, may just be a negotiating tactic.

And as a "staging post" it may disappear when Theresa May's replacement takes over the negotiation.

Meanwhile, Attorney General Geoffrey Cox said it was an "article of faith" that the UK must leave the EU to honour the referendum result.

He told the BBC a customs union was "not desirable" but if that was the only way of leaving the EU, he would take it.

The comments come a day after Mrs May said that she will ask the EU for a further extension to Brexit.

Talks between the prime minister and Jeremy Corbyn on Wednesday were said to be "constructive".

Media playback is unsupported on your device Media caption Jeremy Corbyn: "I recognise that she has made a move... I recognise my responsibility"

It is understood that each party has appointed a negotiating team, and they are meeting before a full day of discussions on Thursday.

Mr Corbyn had said he was "very happy" to meet Mrs May, and would ensure plans for a customs union and protection of workers' rights were on the table.

The DUP has supported the government in a confidence-and-supply pact since June 2017, after a snap general election.

But it is at odds with the prime minister and her Brexit deal, because of the Irish border backstop in the withdrawal agreement.

The party opposes the plan because if it took effect, it would lead to trade differences between Northern Ireland and Great Britain, which the DUP said poses a risk to the integrity of the union.

Media playback is unsupported on your device Media caption The DUP: Partners in government

The UK is still scheduled to leave the EU on 12 April, unless the EU agrees to another extension.

But it is likely to demand that the UK takes part in European elections, which are due to take place on 23 May.

However, Mrs May said she wanted any further extension to be "as short as possible" - before 22 May so the UK does not have to take part in the elections.

Both the UK and EU have continued preparations for a no deal, in the event that a breakthrough cannot be reached in time.