By Gabriel Stargardter and Rodrigo Viga Gaier

JUIZ DE FORA, Brazil, Sept 7 (Reuters) - The run-up to a presidential election in Brazil plunged into chaos on Friday after a knife attack on far-right candidate Jair Bolsonaro put the frontrunner in intensive care just a month before the vote.

Congressman Bolsonaro, who has enraged many Brazilians for years with controversial comments but has a devout following among conservative voters, could take two months to fully recover and will spend at least a week in hospital, said Dr. Luiz Henrique Borsato, who operated on the candidate.

"His internal wounds were grave and put the patient's life at risk," Borsato said. The challenge now is preventing infection that could result from the perforation of Bolsonaro's intestines, he said.

The attack on Bolsonaro, 63, is a twist in what was already Brazil's most unpredictable election since the country's return to democracy three decades ago. Corruption investigations have jailed scores of businessmen and politicians in recent years, and alienated voters.

There was fear of violence flaring across Brazil on Friday, as the nation celebrates Independence Day with political groups likely to march in hundreds of cities. Bolsonaro's rival candidates called off campaign activities for Friday.

ELECTION IMPACT

Under Brazil's campaign laws, Bolsonaro's tiny coalition has almost no campaign time on government-regulated candidate ad blocs on TV and radio. That means Bolsonaro relies on social media and rallies around the country to drum up support. As such, not being able to go out in the streets could impact his campaign.

But Flavio Bolsonaro, the candidate's son, said early Friday outside the hospital where his father was treated that he was conscious and the attack was a political boost.

"I just want to send a message to the thugs who tried to ruin the life of a family man, a guy who is the hope for millions of Brazilians: You just elected him president. He will win in the first round," said Flavio Bolsonaro.

The retired Army captain is running as the law-and-order candidate and has positioned himself as the anti-politician, though he has spent nearly three decades in Congress.

He has long espoused taking a radical stance on public security in Brazil, which United Nations statistics showed has more homicides than any other country.

Bolsonaro, whose trademark pose at rallies is a "guns up" gesture with both hands to make them resemble pistols, has said he would encourage police to kill suspected drug gang members and other armed criminals with abandon.

He has openly praised Brazil's military dictatorship and in the past said it should have killed more people.

Bolsonaro faces trial before the Supreme Court for speech that prosecutors said incited hate and rape. He has called the charges politically motivated.

His stabbing is the latest instance of political violence, which is particularly rampant at local level.

For instance, in the months before 2016 city council elections in Baixada Fluminense, a hardscrabble region the size of Denmark surrounding Rio de Janeiro, at least 13 politicians or candidates were murdered before ballots were cast.

Earlier this year, Marielle Franco, a Rio city councilwoman who was an outspoken critic of police violence against slum residents, was assassinated.

But violence is rare against national political figures, even in the extremely heated political climate that has engulfed Brazil in recent years.

SUSPECT CAUGHT

The Federal Police in a statement said its officers were escorting Bolsonaro at the time of the knife attack and that the "aggressor" was caught in the act. It said circumstances were being investigated.

Local police in Juiz de Fora told Reuters the suspect, Adelio Bispo de Oliveira, 40, was in custody and appeared to be mentally disturbed.

Police video taken at a precinct and aired by TV Globo showed Oliveira telling police he had been ordered by God to carry out the attack.

A few people gathered outside the hospital where Bolsonaro was treated overnight Friday where the scene was calm.

Supporters there included Bruno Engler, 21, who is running for a Minas Gerais state congressional seat for Bolsonaro's Social Liberal Party. He said if he could, he would lynch the suspect.

"They call us on the right the intolerant, the violent ones, but those who are intolerant and violent are them," Engler said, referring to leftist voters.

(Reporting by Gabriel Stargardter and Rodrigo Viga Gaier in Juiz de Fora; Writing by Brad Brooks; Editing by Christopher Cushing)

Our Standards: The Thomson Reuters Trust Principles.