British MPs gave the green light today to a landmark Brexit bill after weeks of debate and a damaging government defeat, but the legislation now faces a battle in the upper chamber. The House of Commons voted by a majority of 29 to approve the EU (Withdrawal) Bill, which repeals the 1972 law that made Britain a member of the European Union and transfers four decades of EU rules onto the British statute books. "This bill is essential for preparing the country for the historic milestone of withdrawing from the European Union," Brexit Secretary David Davis told MPs ahead of the vote. "It ensures that on day one, we'll have a statue book that works, delivering a smooth and orderly exit desired by people, businesses across the United Kingdom and being delivered by this government." However, the unelected upper House of Lords may insist on further changes when peers begin their scrutiny on January 30, while ministers still face opposition from the devolved Scottish and Welsh administrations. The bill is only one of several that Prime Minister Theresa May's minority government must pass to prepare Britain for its withdrawal from the EU in March 2019. MPs had tabled more than 500 amendments and spent more than 80 hours in debate, and Davis said the legislation was heading to the Lords in an "improved" state. But Keir Starmer, Brexit spokesman for the main opposition Labour party, said ministers ignored its concerns and the bill was "still not fit for purpose". The draft legislation passed by 324 votes to 295. Opposition to the bill focused on its sweeping powers to change EU regulations as they are transferred and to authorise any Brexit agreement with the bloc. Eleven members of May's Conservative party joined with opposition lawmakers last month to force a change ensuring that parliament will have a "meaningful vote" on the final withdrawal deal. Fearful of another loss, the government conceded to give MPs the power to amend the date and time of Brexit, set out in the bill as 2300 GMT on March 29, 2019, if talks with the EU appeared to overrun. But Conservative MP Kenneth Clarke, a passionate europhile, said parliament's handling of the bill so far was "pathetic" and said he hoped the Lords would make an "enormous number of changes". Peers are overwhelmingly pro-European, but they are mindful of their role to scrutinise, not block, legislation. A source in the opposition Labour party in the Lords told AFP there were "going to be big battles" in the coming months on constitutional issues. The Scottish National Party (SNP) made a last ditch attempt to thwart the bill, which would see policymaking in devolved areas returned from Brussels to London, and not to the local executive in Edinburgh. SNP lawmaker Ian Blackford warned the government it could trigger a "constitutional crisis" with its plans, which have also drawn anger from Wales. In the final debate in the Commons yesterday, other pro-European MPs took the opportunity to criticise the government's Brexit strategy. Justine Greening, who resigned as May's education secretary this month, warned that if Brexit did not work for young people, they may seek to "improve or undo what we've done". After reaching a deal on the key separation issues in December, Britain is due to start talks with the EU this month on a transition deal before moving on to the future relationship. Britain wants a new trade agreement to replace its membership of the EU's single market and customs union, although critics warn it has unrealistic expectations. Leading Brexit campaigner Nigel Farage has suggested he might be open to a second referendum in Britain on EU membership, to silence critics. European Council President Donald Tusk responded that the EU's "hearts were still open" if Britain changed its mind, a sentiment echoed by European Commission chief Jean-Claude Juncker. However, a spokesman for May insisted yesterday: "We are leaving the European Union."