RIO DE JANEIRO -- The wounding of a leading Brazilian presidential candidate has the potential to reshape the election contest after dramatically exposing the deep polarization in Latin America's largest nation.

Far-right congressman Jair Bolsonaro, a former army captain who has promised to crack down on crime, has long argued that Brazil is in chaos and needs a strong hand to be steadied.

After a knife-wielding man stabbed the candidate in the abdomen during a campaign event Thursday, Brazilians surged on to social media to argue over whether the attack supports Bolsonaro's assertions that the country is off the rails or whether his heated rhetoric contributed to inciting the attack.

Dr. Luiz Henrique Borsato, who performed emergency surgery on the candidate, said Bolsonaro's recovery so far was "satisfactory." He said the candidate would remain hospitalized for at least a week after a two-hour operation to stop serious internal bleeding.

In numerous videos posted on social media of the moment of the attack, Bolsonaro could be seen on the shoulders of a supporter, looking out at the crowd and giving a thumbs up with his left hand. He is seen flinching and then goes out of view. Other videos show supporters carrying him to a car and hitting a man who was apparently the attacker.

A suspect, identified by authorities as 40-year-old Adelio Bispo de Oliveira, was arrested within seconds.

Police did not give a motive, but one official said the man appeared to be mentally unstable.

"Our agents there said the attacker said he was 'on a mission from God,"' Luis Boudens, president of the National Federation of Federal Police, told The Associated Press. "Their impression is that they were not dealing with a mentally stable person."

After more than four years of revelations of widespread corruption within Brazil's political class, anger is running high in the country, and analysts initially predicted this would be a change election. But no true outsider has emerged.

Instead, Bolsonaro, despite being a congressman since 1991, has harnessed much of the anger and presented himself as a maverick who will clean up a corrupt system. He also promises to confront a surge in crime, in part by giving police a freer hand to shoot and kill while on duty.

The public's anger is partially responsible for making this year's campaign the most unpredictable in years for Brazil, and the attack could lead to another seismic shift. The man leading polls, former President Luiz Inacio Lula da Silva, has been barred from running by electoral authorities because he was convicted of corruption and is in jail. That puts Bolsonaro in the lead position, though it is unclear how the attack might affect the campaign for the Oct. 7 presidential ballot.

In the hours following the attack in Juiz de Fora, about 125 miles (200 kilometres) north of Rio de Janeiro, Bolsonaro supporters predicted it would carry him to the presidency.

"They made Bolsonaro a martyr," said Jonatan Valente, a student who joined a small vigil for Bolsonaro in Sao Paulo. "I think the left shot itself in the foot because with this attack they will end up electing Bolsonaro."

But it is unknown when he can get out again on the campaign trail and if his injuries will impede his ability to campaign.

There were signs of the deep divide in Brazil at the vigil, when Bolsonaro's supporters briefly exchanged insults with some detractors who showed up.

Meanwhile, on Twitter many decried the stabbing and asked for prayers for Bolsonaro, but others suggested the candidate might have brought the attack upon himself or even staged it.

This is not the first time in recent months that violence has touched politicians. In March, while da Silva was on a campaign tour in southern Brazil before his imprisonment, gunshots hit buses in his caravan. No one was hurt. Also that month, Marielle Franco, a black councilwoman in Rio de Janeiro, was shot to death in March along with her driver after attending an event.

While Bolsonaro has a strong following, he is a deeply divisive figure. He has been fined, and even faced charges, for derogatory statements toward women, blacks and gays.

He speaks nostalgically about the country's 1964-1985 military dictatorship and has promised to fill his government with current and former military leaders. His vice-presidential running mate is a retired general.

"It's likely that Bolsonaro will use the attack to argue his opponents are desperate, that they had no other way to stop him," said Mauricio Santoro, a political science professor at Rio de Janeiro's state university.

------

Associated Press journalists Peter Prengaman and Marcelo Silva de Sousa in Rio de Janeiro and Victor Caivano in Sao Paulo contributed to this report.