RIO DE JANEIRO — Representative Jair Bolsonaro, the front-runner in Brazil’s presidential election, was hospitalized in intensive care on Thursday night after being stabbed during a campaign event earlier in the day, according to officials.

Mr. Bolsonaro, a far-right politician, has been a divisive figure in Brazil, where he is adored by some for his tough talk and reviled by others for his diatribes against women, gays and blacks.

Mr. Bolsonaro was being carried by supporters through a throng of people in Juiz de Fora, a city in Minas Gerais State, in southeastern Brazil, when a person lunged toward him and jabbed a knife into his abdomen, according to a video of the attack shared on social media.

One of the candidate’s sons, Flavio Bolsonaro, said the knife pierced Mr. Bolsonaro’s liver, a lung and his intestinal tract. “He lost a lot of blood,” he said on Twitter.