A crucial Brexit bill has passed its latest stage in the UK's House of Commons, but Conservative MPs have threatened to stage a rebellion next month.
MPs debated the EU Withdrawal Bill until past midnight into Tuesday morning and it was eventually passed, at its second reading, by 36 votes.
Theresa May has said the attempt to transpose thousands of EU laws and regulations into British law is vital to avoid a legal "cliff edge" when the UK leaves the EU in March 2019.
British Labour leader Jeremy Corbyn had ordered his MPs to vote against the bill, saying the fact that ministers would be able to change the legislation without scrutiny from parliament was a "power grab".
However, the bill was passed by 326 votes to 290 - with seven Labour MPs voting with the government after more than 13 hours of debate.
Mrs May was reliant on all her MPs falling into line, given the lack of a Conservative majority - and managed to secure their support at this stage.
However, a number of Tory MPs voiced concerns about the legislation during the debate and said they would need concessions to be made before they would vote it through at the next stage, scheduled for October.
In a statement following the vote, Mrs May said: "Earlier this morning Parliament took a historic decision to back the will of the British people and vote for a bill which gives certainty and clarity ahead of our withdrawal from the European Union.
"Although there is more to do, this decision means we can move on with negotiations with solid foundations and we continue to encourage MPs from all parts of the UK to work together in support of this vital piece of legislation."
"Pernicious and dangerous"
In a day of heated exchanges, Labour MP Chris Bryant claimed the bill was "pernicious and dangerous" and something that "Erdogan, Madura and Putin would be proud of".
Conservative MPs who voiced concerns included Bob Neill, chair of the Commons' Justice Committee, who said the powers being granted to the government went beyond what is "acceptable or necessary".
Former chancellor Ken Clarke warned his party colleagues that "sweeping" powers could be abused by a future Labour government to amend legislation.
And Conservative MP Dr Sarah Wollaston said she would support her party, but only in the "expectation that they will support sensible amendments" down the line.
The Labour leader faced his own rebellion as several of his MPs defied his order to oppose the bill and vote for a Labour amendment instead.
The amendment was defeated by 318 votes to 296, although it secured support from SNP and Liberal Democrat MPs.
Labour's former Europe minister Caroline Flint, whose constituency voted heavily for Leave, said Labour risked appearing to want to "thwart the result of the EU referendum".
She was heckled by Labour remainers after the vote.
Frank Field, a Leave-supporting Labour MP, hit out at his own colleagues, calling them "wolves in sheep's clothing" for opposing the bill.
Keir Starmer, Labour's shadow Brexit secretary, called the vote a "deeply disappointing result" which "leaves rights unprotected, it silences Parliament on key decisions and undermines the devolution settlement".
Tom Brake, Liberal Democrat Brexit spokesperson, said it was a "dark day for the for the mother of parliaments... The Liberal Democrats will fight to amend the bill in Committee to stop this affront to democracy".