SÃO PAULO, Brazil — The monthly bicycle ride known as Critical Mass began in the southern city of Porto Alegre as such rides do in cities around the world: with activist cyclists riding through downtown streets, blocking traffic, ringing bells and shouting slogans about the environment and the superiority of bicycling for transportation over driving.

But the display of two-wheeled solidarity last Friday turned bloody after a motorist rammed his car through the group, injuring 30, half of them severely, the police said. A video that appeared to have been made by participants in the leaderless bicycle ride captured the moment when a black Volkswagen accelerated through the group of more than 100 cyclists as they pedaled down a tree-lined street in Porto Alegre, about 700 miles south of São Paulo.

The police tracked the man suspected of being the driver, Ricardo José Neis, 47, to a private psychiatric clinic that he checked himself into on Tuesday. On Wednesday he was placed under detention there on suspicion of deliberately driving into the riders.

The city’s police chief, Rodrigo Pohlmann Garcia, said he expected Mr. Neis to be moved to a prison in the next few days.