Britain's parliament has backed a second reading of legislation to sever ties with the European Union.

After more than 13 hours of speeches for and against the legislation early on Tuesday, MPs voted 326 to 290 in favour of moving the EU withdrawal bill, or repeal bill, to the next stage of a lengthy legislative process.

Theresa May, UK prime minister, will now face demands by MPs for concessions before the bill - branded a power grab by the opposition - becomes law.

A key plank in the Conservative government's Brexit plans, the bill aims to convert thousands of EU laws and regulations into UK domestic laws on the day Britain leaves the bloc in March 2019.

The bill was seen as the first big Brexit hurdle.

Many fell into step with the government which said a vote against the legislation would force Britain into a chaotic exit from the EU, rather than a smooth departure, as the country would lack laws and a regulatory framework to steer the process.

May, weakened by the loss of her majority in a June election, now faces a battle against politicians who want to force amendments to the bill, first in the lower house of parliament and then in Britain's unelected upper chamber.

"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," May said in a statement.

"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."

May's justice minister urged MPs to back the bill and signalled that the government would listen to the concerns of politicians despite describing some of their criticism as being "exaggerated up to and beyond the point of hyperbole".

The bill seeks largely to "copy and paste" EU law into British legislation to ensure Britain has functioning laws and the same regulatory framework as the bloc at the moment of Brexit, to offer some reassurance for companies.

Referendum rift

The often impassioned debate in the 650-seat parliament underlined the rifts exposed by last year's EU referendum, not only in Britain's main parties but also in the country.

The opposition Labour Party had called on its MPs to vote against the bill if the government failed to make concessions. But seven rebelled, with some saying they had to respect the demands of their pro-Brexit voters.

"This is a deeply disappointing result," said Keir Starmer, Labour's Brexit spokesman.

"This bill is an affront to parliamentary democracy and a naked power grab by government ministers ... It will make the Brexit process more uncertain, and lead to division and chaos when we need unity and clarity."

OPINION: Brexit Britain - A United Kingdom of hate and denial

The government has defended the bill by saying it will allow Britain to become "masters of our own laws", but it also gives ministers wide-ranging powers to amend laws to make them work domestically, often by interchanging the word EU for Britain.

But MPs, both in Labour and May's governing Conservative Party, expressed fears the government would make substantial changes to legislation without consulting parliament - a charge the government has denied.

Despite the victory for a government now dependent on the support of Northern Ireland's Democratic Unionist Party to secure a working majority, ministers will face attempts by both Conservative and Labour MPs to change the bill.

Final wording

Some MPs want assurances that the government will not misuse its power. Others want to make sure the protections of certain workers rights are also written into the bill before allowing it to move to the unelected upper house of parliament.

The process is expected to take months to complete, and both houses should agree on the final wording before it can be passed.

"Labour will seek to amend and remove the worst aspects from the bill as it passes through parliament," Starmer said.

"But the flaws are so fundamental it's hard to see how this bill could ever be made fit for purpose."