LONDON — The simmering showdown between Prime Minister Boris Johnson and Britain’s Parliament over Brexit came to a head as lawmakers delivered three defeats to the government’s plans for leaving the European Union, before being sent home early Tuesday for a contentious five-week suspension of the legislature.

In a session that ran well past midnight, Parliament enacted a law to block a no-deal Brexit next month, ordered the government to release private communications about its Brexit plans and rejected Johnson’s call for a snap election to break the political deadlock.

Parliament was then suspended at the government’s request until Oct. 14, a drastic move that gives Johnson a respite from lawmakers as he plots his next move.

Opponents accuse him of trying to avoid democratic scrutiny. What is usually a formal prorogation ceremony erupted into raucous scenes as opposition lawmakers in the House of Commons chamber shouted “Shame on you” and held up signs reading “Silenced.”

Commons Speaker John Bercow expressed his displeasure at Parliament’s suspension, saying “this is not a standard or normal prorogation.”

The prime minister has had a turbulent week since Parliament returned from its summer break on Sept. 3. He kicked 21 lawmakers out of the Conservative group in Parliament after they sided with the opposition, and saw two ministers quit his government — one of them his own brother.

Parliament’s suspension ended a day of blows to the embattled Johnson. First an opposition-backed measure designed to stop Britain from crashing out of the EU on Oct. 31 without a divorce deal became law after receiving the formal assent of Queen Elizabeth II. The law compels the government to ask the EU for a three-month delay if no deal has been agreed by Oct. 19.

Johnson says the country’s delayed exit must happen at the end of October, with or without a divorce agreement to smooth the way. But many lawmakers fear a no-deal Brexit would be economically devastating, and are determined to stop him.

“I will not ask for another delay,” Johnson said. But he has few easy ways out of it. His options — all of them extreme — include disobeying the law, which could land him in court or even prison, and resigning so that someone else would have to ask for a delay.

Legislators also demanded the government release, by Wednesday, emails and text messages among aides and officials relating to suspending Parliament and planning for Brexit amid allegations that the suspension is being used to circumvent democracy.

The government is obliged to release the documents under parliamentary rules.

In a statement, the government said it would “consider the implications of this vote and respond in due course.”