LONDON — Thousands of protesters swarmed outside Prime Minister Boris Johnson’s office Saturday, furious at what they called a dangerous and undemocratic gambit to drive through Brexit by shuttering Parliament for five weeks.

Demonstrators carried blue European Union flags and signs reading “Defend our democracy” and “Stop the Coup” over Johnson’s stunning decision this week to suspend Parliament during the biggest domestic crisis in decades.

Johnson said the break was needed to introduce an “exciting” new legislative agenda. But his critics accuse him of trying to silence opponents of Brexit, especially with the increasingly possible “no-deal” departure from the European Union that many analysts say could lead to chaos.

Protesters made it clear that the demonstration was not specifically about the merits of whether Britain should or should not leave the European Union by Oct. 31, as Johnson has promised. 

Their anger was mainly over a perception, by people on both sides of the Brexit issue, that Johnson was subverting democracy by sidelining Parliament.

“Regardless of where one stood on the European Union issue, this puts democracy under threat. This is unprecedented,” said Robert Freer, 58, who joined the raucous London protest, which was part of demonstrations in more than 30 towns and cities across the United Kingdom including Edinburgh, Manchester, Birmingham, Bristol, Liverpool, Sheffield, Cambridge and Oxford. A citizens petition calling for Johnson not to suspend Parliament quickly exceeded 1.6 million signatures.

In Belfast, protesters gathered outside city hall. Brigitte Anton, 52, said that people think Johnson is “a bit of laugh and a buffoon” when, in fact, he is treating Parliament with “contempt.”

“I think he thinks he can get away with things, that people won’t notice, or people will be too surprised or scared to do anything,” she said. “Dictator? I would say not yet but it is developing toward that.”

Addressing thousands in Glasgow, Scotland, Labour Party leader Jeremy Corbyn said people were “angered and outraged.”

In the London protest, a pair of demonstrators carried a mannequin meant to depict a gravely wounded member of Parliament on a stretcher. Another carried a model of Big Ben hanging in a noose, saying that Britain’s democracy was being choked by Johnson’s decision to suspend Parliament. A throng in the Whitehall area of London brought traffic to a halt and chanted: “Get Boris Out! Get Boris Out!” 

“It’s absolutely a coward’s way out,” said William Campbell, 27, a student who traveled to London from the Scottish city of Aberdeen. Standing a stone’s throw from 10 Downing Street, the official residence of the British prime minister, he said Johnson had “begged the queen to help deal with the fact that he has no control over the House of Commons.”

On Wednesday, Johnson asked Queen Elizabeth II to suspend — or prorogue, to use the technical term — Parliament. It’s a normal practice that happens each year, but the length of the break and the timing are unusual and have caused fury, even among many people who support Britain’s departure from the European Union.

“Boris Johnson has effectively shut democracy down,” said Ryan Aldred, 30, a shop manager who voted for Brexit in Britain’s 2016 national referendum.

“To recklessly disregard the political process — whilst technically it may be legal, and that’s debatable with challenges in the law courts — is a fundamental aversion to democracy,” Aldred said.

Standing outside of London’s Westminster subway station, Aldred acknowledged it might be a “clever maneuver” by Johnson. He added, “It’s incredibly dangerous with the precedent it sets. What’s to stop the next controversial vote from being bypassed in some other arcane means?”

Lawmakers, including those in Johnson’s Conservative Party, have opposed his suspension of Parliament because they said it would dramatically shorten the timetable politicians have to express their views on Brexit and to try to stop a no-deal Brexit, which the majority of lawmakers oppose. 

Starting Tuesday, when Parliament returns from its summer break, opposition lawmakers will try to lay down legislation that will stop the suspension and mandate Johnson to seek a delay to Brexit. 

As the British prime minister, Johnson has the power to temporarily close down Parliament. He argued it’s normal practice and that lawmakers will still have “ample” time to debate Brexit. The suspension is scheduled for some time before Sept. 12 to Oct. 14. Britain is scheduled to leave the European Union on Oct. 31. 

Johnson’s argument hasn’t washed well with the public. A recent poll showed that the British public disapproved of Johnson’s prorogation 47 percent to 27 percent.

Sara Thompson, 35 and a graphic designer, brought her son Lenny, 8, to the protest. “I feel it’s really important for Lenny to understand that he does have a voice. We are all feeling very powerless at the moment,” she said, as they sat on the sidewalk eating homemade chocolate chip cookies.

Alison Martin, 52 and a small-business owner who says her business will take a hit if there’s a no-deal Brexit, said Johnson’s “bully-boy tactics overturn centuries of democratic process. This is a parliamentary democracy and our elected representatives should be able to debate; it’s outrageous.”

The outpouring of discontent comes as legal challenges against the government are piling up. On Friday, the former Conservative prime minister John Major said he was throwing his weight behind a legal challenge in England against the prorogation. Courts in Scotland and Northern Ireland are also hearing similar cases.

It has been more than three years since Britain voted 52 to 48 to leave the European Union and the country is as divided as ever. Johnson has vowed to take Britain out of the bloc “do or die” by Oct. 31. He says he wants to strike a deal with the European Union, but the two sides remain at odds over the vexing issue of the Irish border.

Johnson’s willingness to steer Britain out of the E.U. without an exit deal would lead to food and medical shortages and a return to a hard border in Ireland, a leaked government document said. The government said the document, written Aug. 1, was outdated and that it has ramped up no-deal planning. 

Tony King, 48 and a truck driver from London, supported Brexit and said he was at the protest to demonstrate against “traitors” who are trying to keep Britain in the European Union, despite the popular vote. 

“We voted to leave the E.U., and we’ve been stitched up,” he said.

Asked about the five-week suspension of Parliament, King said: “It’s a bit dodgy that he’s done it, but it’s the only way he can get though his deal. There is no other way of doing it because everyone is going against him, even in his own party. He needs to drain the swamp.”

Amanda Ferguson in Belfast contributed to this report.