LONDON — Tens of thousands of people gathered on the streets outside the prime minister’s home and across Britain on Saturday in hastily planned protests against what they called the government’s anti-democratic decision to cut short parliamentary debate and push through Brexit.

They chanted in defense of migrants and waved European Union flags, but their enthusiasm for staying in the bloc took a back seat on Saturday to anger at what many saw as a blossoming, and more urgent, threat: a willingness by Prime Minister Boris Johnson to stretch or outright disobey the Constitution in service of Brexit.

“If you shut down Parliament, we shut down the streets!” demonstrators shouted in unison as they swarmed black cabs and double-decker buses at Trafalgar Square in central London. After they succeeded in stopping traffic, they pulled out takeout salads and bags of carrots and picnicked in front of the honking cars.

The protesters denounced Mr. Johnson’s decision this past week to banish Parliament for five weeks at the height of a political crisis over Brexit, one that has grown progressively more heated since Mr. Johnson took office with a vow to pull Britain out of the European Union, with or without a deal, by Oct. 31.