The prime minister hailed the crossing of the “Brexit finish line” as peers in the House of Lords ended the bout of ‘ping-pong’ with the Commons on Wednesday evening.
Now the legislation just needs Royal Assent to be formally granted by the Queen and the agreement to be approved by the European Parliament by Brexit day on 31 January.
Speaking after the bill passed, the PM said the nation would "move forwards as one United Kingdom", adding: "At times it felt like we would never cross the Brexit finish line, but we've done it.
"Now we can put the rancour and division of the past three years behind us and focus on delivering a bright, exciting future – with better hospitals and schools, safer streets and opportunity spread to every corner of our country.”
Read more from Yahoo News UK:
The Queen's formal approval of the European Union (Withdrawal Agreement) Bill is expected in the coming days while the European Parliament will hold its consent vote on 29 January.
MPs had reversed five changes made to the legislation by the Lords during the ping-pong phase where the bill moved between the two Houses until agreement is achieved.
Peers had defeated the Government on EU workers having the right to physical proof of their right to remain and on the power of courts to depart from European Court of Justice rulings.
They also worked to ensure the rights of unaccompanied child refugees to be reunited with their families in the UK post-Brexit.
But all five amendments were comfortably reversed by MPs, with majorities ranging from 86 to 103, before the upper house gave way.