The election of far-right President Jair Bolsonaro in 2018 looked to some like a death blow for the Brazilian left after the spectacular fall of its 13-year rule. But the heart monitor may have just emitted a blip in local elections.
Rewind a decade or so, and Brazil's left wing looked invincible: president Luiz Inacio Lula da Silva, the charismatic co-founder of the Workers' Party (PT), was presiding over a booming economy, slashing poverty in one of the world's most unequal countries, and was called "the most popular politician on Earth" by no less than Barack Obama.
But fast forward again to 2016, and oh how things had changed: Lula's hand-picked successor, Dilma Rousseff, was impeached, and Lula himself charged with running a colossal corruption scheme.
That year, the PT lost more than half the 630 cities it governed in local elections. Voters continued to vent their rage two years later, giving Bolsonaro an emphatic victory.
Last Sunday's elections -- the first since -- were hardly a rebound for the left, which remains a shadow of its pre-2016 self.
However, they were not a win for Bolsonaro, either: just two of the 13 candidates he endorsed for mayor were elected, with two more reaching the November 29 runoff.
Of the 45 city council candidates he backed, just nine won.
Instead, voters largely embraced traditional centrist and center-right parties, in what analysts called a break from the polarized radicalism of 2018.
The elections meanwhile gave a sliver of hope to Brazilian progressives -- though not necessarily the Workers' Party -- with surprisingly strong results for a new generation of young leftists from outside the PT.
In Sao Paulo, Brazil's biggest city, Guilherme Boulos, a 38-year-old leader of the Homeless Workers' Movement (MST), defied early opinion polls to survive for a runoff against the incumbent, center-right Mayor Bruno Covas.
Boulos, who is running for the Socialism and Liberty Party (PSOL), fended off both the Bolsonaro and PT candidates, winning 20 percent of the vote to 33 percent for Covas.
His late surge caused celebration on the left -- though not for the PT, whose loss was all the more humiliating given that Sao Paulo was Lula's bastion.
"Getting Boulos into the second round in Sao Paulo is really symbolic if we consider that it's the place where the PT began its rise to become a national party," said Flavia Biroli, a political scientist at the University of Brasilia.
The PSOL, which was founded in 2004 as a breakaway from the PT, picked up two new mayoral wins, taking the number of cities it governs to four, and reached the second round in two others, including Sao Paulo.
In the southern city of Porto Alegre, rising political star Manuela D'Avila, 39, meanwhile reached the second round running for the Communist Party of Brazil -- this time with the PT's backing.
Two other young leftists will face each other in the second round in the northeastern city of Recife: 26-year-old Joao Campos of the center-left Brazilian Socialist Party (PSB) and 36-year-old Marilia Arraes of the PT.
- Divided front -
Many Brazilian politics junkies see Boulos as a natural successor to Lula, who is now 75 and still fighting various corruption cases, which have badly tarnished his image.
"Lula remains an outsize presence in Brazilian politics," said Claudio Couto, a professor at the Getulio Vargas Foundation.
"But he's in a state of natural political decline, while Boulos is on the rise and comes from the new generation."
The PSOL appears to be doing better than the PT at speaking to young voters on subjects like women's rights, racial equality and LGBT issues.
But analysts broadly agree the left will have to learn to unite if it wants to beat Bolsonaro at the next presidential polls.
Longtime PT leader Eduardo Suplicy wants the left to implement primary elections.
"We'll have to reflect on the importance of unifying behind a single candidate in 2022," he told AFP.