In September 2018, as Jair Bolsonaro campaigned in the south-eastern city of Juiz de Fora, a 40-year-old man pushed through the crowd and stabbed the presidential candidate in the stomach.
Images of Bolsonaro doubled over in pain, wearing a T-shirt in Brazil's football colors, were shared millions of times and broadcast endlessly on television.
The former army captain survived, and the shock and commotion caused by the attack boosted his outsider image and helped carry him to victory weeks later.
Seven years on, Brazil's Supreme Court has found him guilty of plotting a coup and sentenced him to more than 27 years in prison. On the face of it, Bolsonaro's career is over.
However, he remains one of the most consequential politicians of recent decades, and with allies already pushing for amnesty, his influence and even the prospect of a comeback still hangs over Brazil's future.
Because of his inflammatory rhetoric, Bolsonaro was never taken seriously by most of Brazil's political establishment before becoming president.
In July 2018, three months before the election, I was BBC Brasil's São Paulo bureau chief. In conversations with pollsters, politicians, and business leaders, the consensus was clear: despite leading in most polls, Bolsonaro could not win; he lacked the machinery of a major party and his support would quickly fade once television campaigning began.
Bolsonaro, a former army official who began a three-decade career as a congressman, built a persona on incendiary statements and defense of the military dictatorship that ended in 1985. For decades, he was a constant presence on television talk shows where he railed against democracy and praised authoritarian rule.
But in 2018, Brazilians were hungry for change, after enduring mass protests, a deep recession, and political scandals. Bolsonaro saw his opportunity and, through social media, gathered a broad coalition of frustrated voters, eventually leading to his election in October 2018.
Bolsonaro's administration was pro-business, aligned with Donald Trump's United States, and led to increased deforestation in the Amazon. However, the real challenges came with the pandemic in 2020. He resisted health measures, promoted unproven treatments, and thousands of lives could have been saved with earlier vaccination strategies.
More than any opposition party, Bolsonaro's most formidable foe during his presidency was the Supreme Court, which rejected many of his policies. Among the justices, Alexandre de Moraes became a key figure in countering Bolsonaro's agenda.
In the wake of the 2022 elections, Bolsonaro refused to acknowledge defeat, leading to protests and unrest among his supporters. His eventual absence during Lula's inauguration represented a critical moment in Brazilian democracy.
Following his return to Brazil, Bolsonaro has aimed to regroup his allies while facing convictions that may bar him from public office until 2060. However, discussions of potential amnesty for his actions continue to stir controversy and keep his political future uncertain.