Members of Parliament overwhelming voted to pass a Bill which requires the prime minister to seek an extension to Article 50 and with the aim of avoiding a no-deal Brexit.
The Cooper-Letwin Bill staves off the pressure of the UK crashing out of the European Union without a deal on Friday 12 April.
The Bill quickly received royal assent, meaning it has now become law.
Earlier peers in the House of Lords gave the European Union (Withdrawal) (No 5) Bill an unopposed third reading after just 10 minutes of debate.
Promoted by Labour's Yvette Cooper in the Commons, the Bill squeaked through the elected House by just one vote last week.
It ran into trouble in the Lords last Thursday when opponents tried to block the measure being forced through in just one day.
Peers backed amendments to the Bill aimed at promoting legal certainty and avoiding the UK "accidentally" dropping out with no deal if the council came back with a counter proposal.
Another change made clear that nothing in the Bill prevented the Prime Minister from "seeking or agreeing" an extension, provided it was not earlier than May 22.
In the closing stages, Labour former Cabinet minister Lord Robertson of Port Ellen said it was a historic moment.
The Prime Minister is seeking a further Brexit delay to June 30 and EU leaders will discuss this at an emergency summit on Wednesday.
Mrs May spoke to Irish prime minister Leo Varadkar on Monday night about her recent letter to Donald Tusk and her desire to extend Article 50.
Mr Varadkar expressed his openness to the idea of extending the withdrawal deadline.
Tory MP Daniel Kawczynski confirmed he has quit the European Research Group (ERG) of Conservative backbenchers because of its continued opposition to Mrs May's Withdrawal Agreement passing the Commons at a fourth attempt.
Mr Kawczynski tweeted: "Have decided to resign from ERG. Despite excellent Chairmanship by @Jacob--Rees--Mogg who has accommodated all views I can no longer be a member of caucas which is preventing WA4 from passing.
"Hardcore element of 'Unicorn' dreamers now actually endangering #Brexit."