British Prime Minister Boris Johnson speaks during Prime Ministers Questions in the House of Commons in London on Wednesday. (Jessica Taylor/UK Parliament/EPA-EFE/REX/Shutterstock)

BORIS JOHNSON’S attempt to sideline the British Parliament to force through the country’s exit from the European Union seemed on Wednesday to have blown up in his face. Confronted with the prime minister’s imminent imposition of a prolonged recess, his opponents voted to seize control of the parliamentary agenda, then passed a bill aimed at blocking him from triggering a “no-deal Brexit” on Oct. 31, as he had threatened to do. Along the way, Mr. Johnson’s Conservative Party splintered: More than 20 of its Parliament members, including some of its most senior figures, voted with the opposition and were then expelled.

Westminster has been rocked by angry rhetoric and complex maneuvering this week, with both Mr. Johnson and his opponents testing the limits of the country’s unwritten constitution. The most likely result of the prime minister’s defeat seemed to be a snap election, either just before or sometime after the Oct. 31 Brexit deadline. That is, in one sense, encouraging: Democracy, in the form of a national vote, is the best way out of Britain’s deepening crisis. But voters could be offered an unpalatable choice between a Conservative Party seemingly bent on a radical rupture with the E.U. and a Labour alternative committed to a socialist revolution. Either could do far-reaching damage to Britain’s economy.

Mr. Johnson brought this on with his reckless attempt to deliver on his pledge that Britain would leave the E.U. at the end of next month, “do or die.” Knowing that Parliament had rejected the terms for departure negotiated by the previous government — which E.U. leaders insist are not subject to change — and that there was also no majority for a no-deal Brexit, the new prime minister sought to preserve the latter option by forcing Parliament into recess for five weeks, beginning next week. He claimed he intended to use the threat of a sharp break to negotiate new terms with Brussels by late October. And yet E.U. leaders and Conservative Party dissidents said this week that Mr. Johnson had advanced no new proposals.

The suspicion that Mr. Johnson was trying to force a no-deal exit on an unwilling country, which according to government estimates would have to live with shortages of food and medicine in the aftermath, helped prompt a remarkable number of Conservatives to turn against the government, including several longtime cabinet ministers and Winston Churchill’s grandson. They did so knowing that their votes could end their political careers. It was a rare display of principled integrity in a parliamentary scrum that has seen both Mr. Johnson and his opponents transgress norms of procedure and rhetoric. Opponents described Mr. Johnson’s parliamentary suspension as a “coup,” while others warned that the opposition’s unusual vote to strip control of the parliamentary agenda from the government set a dangerous precedent.

The jousting is likely to continue as Mr. Johnson seeks to hold an election before Oct. 31, or otherwise find a way to complete Brexit by that date, and Labour tries to force an extension of the exit deadline to early next year before agreeing to an election date. It’s hard to wish either party success; both appear committed to policies that would be bad for Britain.