Jair Bolsonaro, an extreme rightwing retired army captain and leading contender in Brazil’s presidential elections, has reassured his 1.4 million Twitter followers he is “well and recovering” after a knife attack as he campaigned last week.

Bolsonaro, 63, was stabbed on Thursday while being carried on the shoulders of a man through a crowd of supporters in the city of Juiz de Fora in Minas Gerais state.

The attack against the self-styled political outsider, who has been compared to Donald Trump and Philippine president Rodrigo Duterte for his extreme anti-crime approach and adept use of social media, appalled Brazilians and plunged what was already the most unpredictable Brazilian election in decades into further disarray.

Mobile phone videos of the attack showed Bolsonaro waving to the crowd, clutching his abdomen and crying out in pain before falling backwards into the arms of those around him. He was rushed to hospital in Juiz de Fora, where surgeons fought to stem a haemorrhage and stitch intestinal wounds. He now has a temporary colostomy bag.

“All of us have a mission here on Earth,” Bolsonaro said in a video released before being transferred to a São Paulo hospital, which showed him speaking with difficulty from his bed: “I prepared myself for a moment like this, because you run risks.” He later tweeted: “I’m well and I’m recovering!”

Adélio Bispo de Oliveira, suspected of stabbing Bolsonaro, is escorted by police at the airport in Juiz de Fora on 8 September. Photograph: Ricardo Moraes/Reuters

The federal deputy from Rio de Janeiro has garnered significant support among conservative Brazilians, unnerved by repeated corruption scandals and rising violent crime, with his calls for looser gun laws, impunity for police who kill criminals, chemical castration for rapists, attacks on the left and praise for Brazil’s brutal 1964-85 military dictatorship.

He is polling behind former leftist president Luiz Inácio Lula da Silva for the 7 October poll – but Lula is serving a 12-year jail sentence for corruption and money laundering and has been ruled ineligible for the contest by Brazil’s top electoral court. Lula is appealing against his ban but is expected to pass the baton to his vice-presidential candidate, former São Paulo mayor Fernando Haddad.

Bolsonaro leads some polling scenarios where Lula is not included, but a survey last week showed him losing to three other candidates in a 28 October run-off vote should the first round be inconclusive and should he draw level with Haddad.

The attack has intensified an already toxic political atmosphere, with Brazilians on the right and left bombarding social media with fake news about both attack and attacker.

“It contaminates everything,” said Carlos Melo, a professor of political science at São Paulo business school Insper. “There is a strong emotion around him because he is a victim.”

Attacks against such high-profile candidates are rare in Brazil but, in March, Marielle Franco, a leftist councillor in Rio, was murdered, and buses in a Lula caravan touring southern Brazil were hit by shots, though the former leader was not with them at the time.

Some leftists have claimed the stabbing was faked in an elaborate conspiracy to bolster Bolsonaro’s election chances, despite medical bulletins and a press conference by the team of doctors from the private hospital who operated on him. Meanwhile his supporters have shared social media posts linking alleged attacker Adélio Bispo de Oliveira to Lula’s leftist Workers’ party, even faking photos to insert him into a crowd around Lula.

“There was a big distribution of fake news from both sides of the political spectrum,” said Tai Nalon, founder of a fact-checking service called Aos Fatos (To the Facts), which has debunked some of the claims.

Bolsonaro’s political allies have said the stabbing was designed to remove him from an election that his son Flavio, another deputy, said on Thursday he was now sure to win.

“The attack on Jair Bolsonaro is an attack on Brazilian democracy. It is an attempt to remove someone who thinks differently from the election,” said Fernando Francischini, a federal police officer and deputy in Bolsonaro’s tiny Social Liberal party.

Bolsonaro will now need weeks to recover, which removes him from television debates, where he has struggled with difficult questioning, and street campaign events, where crowds chant “Myth! Myth!” when he appears.

Analysts said the attack could give him a short-term bounce.

“The attack leaves the candidate Bolsonaro in a very favourable situation to reach the run-off vote. But it is not enough to say he will win,” said Ricardo Ismael, a professor of political science at the Pontifical Catholic University in Rio de Janeiro.