Image copyright Getty Images

Theresa May has insisted Parliament will have a "meaningful vote" on the terms of Brexit as she faces the threat of a defeat in the Commons.

The PM said MPs would have a say on the final deal before the UK exit in March 2019, but it must happen in a way that ensures a "smooth and orderly" exit.

Tory rebels will join forces with Labour to seek an explicit legal guarantee in the EU Withdrawal Bill.

Lead rebel Dominic Grieve said it was his time to "stand up and be counted".

Brexit Secretary David Davis has written to Tory MPs but Dominic Grieve - who is leading demands for a vote on any final Brexit deal before it is finalised - has said he will not back down.

"There is a time for everybody to stand up and be counted," the former attorney general told MPs.

The day's debate on the EU bill is under way, with Mr Grieve's amendment due to be voted on later.

What's going on?

The UK is due to leave the EU in March 2019, and negotiations are taking place on what their relationship will be in the future.

The EU Withdrawal Bill is a key part of the government's exit strategy.

Its effects include ending the supremacy of EU law and copying existing EU law into UK law, so that the same rules and regulations apply on Brexit day.

The bill is currently making its way through Parliament, where MPs from across the House of Commons have been trying to amend it.

So far it has emerged unscathed, but on Wednesday several rebels are lining up behind Mr Grieve's bid to ensure a "meaningful vote" on any final deal agreed with Brussels.

This could be tricky for the government as it has no overall majority in the House of Commons.

What do the rebels want?

They want to change the EU Withdrawal Bill so the government is unable to implement the agreement it reaches with the EU unless MPs give the green light via a new Act of Parliament.

They want to change a part of the bill that allows ministers to do this using secondary legislation, which has less scrutiny from MPs.

Otherwise, they argue, Parliament might not get the final say on the terms of the UK's departure.

The government has already offered a take-it-or-leave-it vote on the final deal reached with Brussels and to enshrine the withdrawal agreement in a new Act of Parliament.

But the rebels say that unless this is explicitly written into the bill, MPs and peers might get bypassed at the last minute.

What the government's saying

Ahead of the vote, Mr Davis wrote to all Conservative MPs on Wednesday morning promising "a meaningful vote" on Brexit.

He said there will be a vote in Parliament "as soon as possible" after an agreement with the EU is reached, adding: "Our entire approach to the bill has been to listen to MPs."

Skip Twitter post by @daily_politics “We will put the final withdrawal agreement between the UK and the EU to a vote in both houses of Parliament before it comes into force" says the PM



MPs will vote “well before March 2019” ahead of the vote in European Parliament #pmqs pic.twitter.com/W9EcuwjUob — BBC Daily Politics and Sunday Politics (@daily_politics) December 13, 2017 Report

Speaking during Prime Minister's Questions, Theresa May explained the government's objections to Mr Grieve's bid to require the Act of Parliament to be in force before ministers implement the deal.

The new Act of Parliament might only be passed "at a very late stage in the proceedings, which could mean that we are not able to have the orderly and smooth exit from the European Union that we wish to have", she said.

Both the UK and the EU currently say they want a deal by October 2018, to allow for the UK and European Parliaments to vote on it.

Will the government be defeated?

We won't know until later, when Mr Grieve's amendment is debated. But he has claimed to have the numbers to inflict defeat on the government.

Since the general election, where Theresa May lost the Tories' Commons majority, any vote has the potential to be close.

The government needs the backing of Northern Ireland's Democratic Unionist Party to get a working majority of 13, and several Conservative MPs have confirmed they will rebel. But will it be enough?

Skip Twitter post by @Keir_Starmer Labour will back Dominic Grieve's amendment giving Parliament a proper say on the Brexit deal if he pushes it to a vote tonight. The terms of our future are not for the government alone to determine. — Keir Starmer (@Keir_Starmer) December 13, 2017 Report

Labour has said it will support Mr Grieve's amendment, but what about its MPs that back Brexit - which way will they vote?

One of the leading rebels told the BBC's Laura Kuenssberg "it really may come down to the twos or threes".

What the vote means for Brexit

By BBC assistant political editor Norman Smith

I'm guessing everyone's a bit jaded with the endless Brexit rows and threats of revolts. But this one really does matter.

This is the Big Bananas moment. And on that both sides seem to agree. It's not a minor, footling technical issue - it's about who's running the show, Parliament or the prime minister.

Brexiteers view tonight's vote as an attempt by refusenik Remainers to de-rail Brexit. And, privately, some hard line Remainers see it as a means to fundamentally change the terms of the UK's departure from the EU. Other rebels argue it's about making good the Brexiteers promise to "take back control' to the UK Parliament.

But it is also a Big Bananas moment for Theresa May. Defeat in the Commons - and it would be her first - would knock her premiership back on the ropes after she had bounced back with last week's deal in Brussels.

It would also dent her authority in the Brexit negotiations with EU leaders, who would again question her ability to deliver a deal.

What they're saying

Image copyright House of Commons Image caption Conservative MP Dominic Grieve (left) is leading the rebellion despite criticism from Eurosceptic MPs

Man-of-the-moment Mr Grieve has set out his stall in the Commons, saying he cannot recall ever rebelling against his party before.

However, he said: "As Churchill said, 'he's a good party man - he puts the party before himself and the country before his party' and that's what I intend to do."

Mr Grieve and the other likely Tory rebels have faced criticism from some of their colleagues.

Skip Twitter post by @Anna_Soubry 1/2Re A7. Govt genuinely trying to find v late solution but WMS & letter from DD highlights Parl effectively a rubber stamp on a done deal. — Anna Soubry (@Anna_Soubry) December 13, 2017 Report

Former Tory leader Iain Duncan Smith said: "There comes a moment when really grandstanding has to stop. Tying the government's hands in the way that he would wish to tie them so early on is quite wrong."

Mr Grieve criticised the "hurling of public abuse" and pointed to Mr Duncan Smith's own rebellions over Europe.

Former education secretary Nicky Morgan told the BBC it was in the national interest for Parliament to have a "final vote on the final deal" and urged ministers to listen at "this late stage".

Other likely rebels have also indicated they will not be backing down, without further concessions by the government.