SÃO PAULO, Brazil — Protesters showed up by the thousands in Brazil’s largest cities on Monday night in a remarkable display of strength for an agitation that had begun with small protests against bus-fare increases, then evolved into a broader movement by groups and individuals irate over a range of issues including the country’s high cost of living and lavish new stadium projects.

The growing protests rank among the largest and most resonant since the nation’s military dictatorship ended in 1985, with demonstrators numbering into the tens of thousands gathered here in São Paulo, Brazil’s largest city, and other large protests unfolding in cities like Rio de Janeiro, Salvador, Curitiba, Belém and Brasília, the capital, where marchers made their way to the roof of Congress.

Sharing a parallel with the antigovernment protests in Turkey, the demonstrations in Brazil intensified after a harsh police crackdown last week stunned many citizens. In images shared widely on social media, the police here were seen beating unarmed protesters with batons and dispersing crowds by firing rubber bullets and tear gas into their midst.

“The violence has come from the government,” said Mariana Toledo, 27, a graduate student at the University of São Paulo who was among the protesters on Monday. “Such violent acts by the police instill fear, and at the same time the need to keep protesting.”