LONDON (AP) — Britain passed a major milestone on the road to Brexit when the House of Commons on Thursday approved a bill authorizing the country’s departure from the European Union at the end of the month.

Lawmakers voted by 330-231 to pass the Withdrawal Agreement Bill, which sets the terms of Britain’s departure from the 28-nation bloc. The comfortable majority won by Prime Minister Boris Johnson’s Conservatives in an election last month secured the bill’s passage despite the opposition of smaller parties.

The bill was approved after three days of debate that brought none of the frayed tempers, late-night sessions and knife-edge votes that marked previous rounds of Brexit wrangling over the past year.

After passing through Parliament’s unelected House of Lords -- which can delay but not overturn the result in the Commons -- the bill should become law in time for the U.K. to leave the EU on the scheduled date of Jan. 31 and become the first nation ever to quit the bloc..

Brexit Secretary Stephen Barclay said he welcomed the “constructive scrutiny” of the Lords but hoped the upper house would not try to delay the bill.

“I have no doubt that their lordships will have heard the resounding message from the British people on the 12th of December,” he said.

Thursday’s vote was a major victory for Johnson, who has made delivering Brexit the key aim of his premiership. Britain voted narrowly to leave the EU in a 2016 referendum. But before the Dec. 12 election, lawmakers repeatedly defeated attempts by both Johnson and predecessor Theresa May to secure backing for their Brexit blueprints.

But despite Johnson’s repeated promise to “get Brexit done” on Jan. 31, the departure will only mark the start of the first stage of the country’s EU exit. Britain and the EU will then launch into negotiations on their future relationship, racing to strike new relationships for trade, security and a host of other areas by the end of 2020.

“Leaving the EU doesn’t mean that we will have got Brexit done,” said Paul Blomfield, a Brexit spokesman for the main opposition Labour Party. “We’ll have completed the first step, departure, but the difficult stage is yet to come.”

Top officials in the bloc are already saying that sealing a new deal will be tough.

Michel Barnier, the EU’s chief Brexit negotiator, said Thursday that Britain’s goal of striking a full free trade agreement by the end-of-year deadline that Johnson insists on was unrealistic.

“We cannot expect to agree on every aspect of this new partnership,” Barnier said, adding “we are ready to do our best in the 11 months.”

International trade agreements typically take years to complete, but Johnson has ruled out extending a post-Brexit transition period agreed by the two sides beyond the end of 2020, although the EU has offered to prolong it until 2022. That has set off alarm bells among U.K. businesses, which fear Britain could face a “no-deal” Brexit at the start of 2021. Economists say that would disrupt trade with the EU — Britain’s biggest trading partner — and plunge the U.K. into recession.

Britain and the EU will have to strike deals on everything from trade in goods and services to fishing, aviation, medicines and security. The EU insists there is no way to deal with all these issues in less than a year. British officials have suggested they could carve the negotiations up into chunks, sealing deals one sector at a time.

The two sides also have conflicting demands that are likely to complicate negotiations.

Johnson says the U.K. is seeking a wide-ranging free trade deal with the bloc, but doesn’t want to agree to keep all EU rules and standards. It wants to be free to diverge in order to strike new trade deals around the world.

The EU says the U.K. won’t get good access to its market unless it agrees to alignment. EU officials worry that Britain plans to cut environmental and employment standards in order to position itself as a low-regulation, low-tax competitor to the bloc.

The bloc has stressed the need for a level playing field in the upcoming trade negotiations, meaning that access to the EU market will be linked to U.K. commitments to standards in area including workers’ rights and the environment.

On Thursday, Barnier added that if Britain wants as much access as possible to the bloc’s market, it won’t have unfettered freedom to subsidize its industry. He said state aid rules in any future trade deal would be more stringent than with nations like Canada or Japan, simply because of the physical proximity of the departing EU nation.

“We will ask necessarily certain conditions on state aid policy in the U.K.,” Barnier said.

“If the U.K. wants an open link with us for the products — zero tariffs, zero quotas — we need to be careful about zero dumping at the same time,” he told a conference in Stockholm.

As a member state, Britain was bound by strict state aid rules enforced by the powerful European Commission to make sure there is no unfair competition among nations inside the EU’s vast single market. Third countries aren’t immediately bound by such strictures.