LONDON — The Queen has officially signed the Brexit bill into law, paving the way for Prime Minister Theresa May to trigger Article 50 and initiate Britain's formal exit from the European Union.

Queen Elizabeth II gave the European Union (Notification of Withdrawal) Bill its royal assent shortly before 11:00 a.m. (GMT) on Thursday, meaning that May now has the legal authority to trigger Article 50 of the Lisbon Treaty at a time of her choosing.

May has promised to deliver a speech in the Commons to announce when she has invoked Article 50 but is yet to confirm whether there will be advanced notice of this taking place.

The prime minister intends to officially notify the European Union that the United Kingdom is leaving the 28-nation by the end of March. Monday, March 27, is the most likely date for notification, according to multiple reports.

May told MPs this week that invoking Article 50 will be a "defining moment" in Britain's history.

Here's the moment Commons speaker announced the news to MPs:

Cheers as John Bercow tells MPs the Queen has given Royal Assent to the Brexit act pic.twitter.com/b3WiEkiefP — Esther Webber (@estwebber) March 16, 2017

The Brexit bill was passed by both houses of parliament late on Monday evening after peers in the House of Lords gave up on an uphill effort to add two significant amendments before it became legislation.

One amendment sought to guarantee the residence rights of EU citizens living in Britain, while the other wanted parliament to be given a "meaningful vote" on the terms of Brexit at the end of the two-year Article 50 negotiations.

However, the Lords eventually backed down after MPs voted to reject the proposed amendments, meaning the bill was sent to the Queen for her approval unamended.

The Queen's signing of the Brexit bill follows a difficult 48-hours for May's government, ridden with blunders and negative headlines.

Brexit Secretary David Davis admitted on Wednesday that he had not yet calculated the likely cost of Britain dropping out of the European Union with no exit deal in place.

"I cannot quantify that in detail yet. I may well do in about a years' time," the cabinet minister said.

This was despite May's repeated claim that "no deal is better than a bad deal" for Britain.

This followed the government's announcement that it had dropped plans to increase National Insurance contributions for the self-employed. Chancellor Philip Hammond announced the measure in his spring Budget last week despite the 2015 Conservative manifesto promising to freeze all National Insurance.

Labour leader Jeremy Corbyn accused the government of being in "chaos" during Prime Minister's Questions.