LONDON -- Britain's Parliament dealt Prime Minister Theresa May's government two bruising defeats on Tuesday, even before lawmakers began an epic debate that will decide the fate of May's European Union divorce deal -- and of her political career.

Opening five days of debate on the Brexit deal, May told Parliament that the British people had voted in 2016 to leave the EU, and it was the "duty of this Parliament to deliver on the result" of the referendum.

Despite her entreaties, the government appeared to be on a collision course with an increasingly assertive Parliament over the next steps in the U.K.'s exit.

Minutes before May rose to speak, lawmakers delivered a historic rebuke, finding her Conservative government in contempt of Parliament for refusing to publish the advice it had received from the country's top law officer about the proposed terms of Brexit.

The reprimand, by 311 votes to 293, marks the first time a British government has been found in contempt of Parliament.

Labour Party Brexit spokesman Keir Starmer called the contempt finding "a badge of shame" for the government.

The government said that in light of the vote it would publish the advice from Attorney General Geoffrey Cox on Wednesday.

The main thrust of Cox's advice is already known -- the government released a 43-page document on it Monday in a bid to fend off the contempt motion. But the contempt vote demonstrated the fragility of May's government, which does not have a majority in Parliament.

In another sign of the government's weakness, lawmakers also passed an amendment giving Parliament more say over the government's next steps if the divorce deal is rejected in a vote on Dec. 11.

The deal, endorsed last month by the 27 other EU leaders, lays out the terms of Britain's departure from the bloc on March 29 and sets the framework for future relations with the EU. Rejecting it would leave the U.K. facing the prospect of a chaotic "no-deal" Brexit, but May's chances of winning majority backing for the deal appear slim.

Politicians on both sides of Britain's EU membership debate oppose the agreement -- pro-Brexit legislators because it keeps Britain bound closely to the EU, and pro-EU politicians because it erects barriers between the U.K. and its biggest trading partner.

"The numbers in the Houses of Parliament look pretty formidable for Theresa May," said Alan Wager, a research associate at the U.K. at the Changing Europe think-tank . "Over 100 Conservative MPs have said they are not going to back the deal, the Labour Party have said they are not going to back the deal. So it looks like the deal won't pass next week."

Leaving the EU without a deal would end more than 40 years of free trade and disrupt the flow of goods and services between Britain and the EU. The Bank of England warned last week that a no-deal Brexit could plunge Britain into a severe recession.

Bank of England Governor Mark Carney said Tuesday that British consumers could see their weekly supermarket bills up by 10 per cent in a worst-case Brexit scenario that involves a 25 per cent fall in the value of the pound.

Pro-EU lawmakers said they had made the prospect of a "no-deal" Brexit less likely by securing an amendment giving Parliament more power to guide the government's next steps if the deal is rejected on Dec. 11.

If that happens, the government is required to come back within 21 days and say what it plans to do. The amendment stipulates that Parliament can change that statement -- effectively telling the government what to do. Since most lawmakers oppose a no-deal Brexit, they could essentially take that option off the table.

In another boost to opponents of Brexit, a top official at the European Union's highest court advised Tuesday that Britain can change its mind about leaving the European Union if it wants.

Advocate General Manuel Campos Sanchez-Bordona told the European Court of Justice that EU law "allows the unilateral revocation of the notification of the intention to withdraw from the EU."

The advice of the advocate general is often, but not always, followed by the full court, whose final verdict is expected within weeks.

May's spokesman, James Slack, said the opinion didn't change "the clear position of the government that Article 50 is not going to be revoked."

But the advice bolstered anti-Brexit campaigners, who hope the decision to leave can be reversed.

Jo Maugham, a British lawyer who helped bring the case, said it "puts the decision about our future back into the hands of our own elected representatives -- where it belongs."

------

Raf Casert reported from Brussels. Pan Pylas in London contributed to this story.