After more than 52 hours of fraught twists and turns, Brazil's former president Luiz Inácio Lula da Silva was finally put behind bars over the weekend, watched by a nation divided between those who adore him and those who abhor him.
And with a presidential election just six months away, Latin America's biggest economy is entering a new stage of uncertainty.
Whether he was loved or loathed, Lula was never far from the public eye and despite the scandals around him, he remains far and away the frontrunner in October's election – even though he will more than likely be barred from running.
A key figure in both Brazil and Latin America over the past two decades, Lula once described himself as a "metamorfose ambulante" – a line paraphrased from a song by a psychedelic rocker that loosely translates as a "wandering shapeshifter."
And that he was – first catching the public's attention as the child born in poverty who fought his way to the presidential palace, and more recently as the working class president who spoke the language of the markets.
And now, at 72, he is starting a new life as a prisoner. Although it is too early to know if he will manage to go free, there is no question of him fading out of the public eye.
"He's a born leader, a key figure in (Brazil's) political history, particularly for the left," said Andre Cesar, an analyst at the Hold political consultancy. "From prison, he will continue exerting his influence and he could also exploit the symbolism of his victimisation."
During the past few days' drama, Lula once again came into his own.
Holed up inside the headquarters of the metalworkers' union that transformed him into a leftist icon three decades ago, he brazenly flaunted an arrest order, tried to negotiate with the authorities, gave an emotionally-charged speech and ended up handing himself in, surrounded by a crowd of adoring supporters.
A crossroads for the left
If Lula can't run, who will he back from the sidelines? During his last speech as a free man, the former union boss had much to say to his supporters.
A brilliant orator, Lula was mostly flanked by young, future candidates of the left such as Manuela d'Ávila, one of the Communist party leaders who could barely hold back her tears, and Guilherme Boulos of the PSOL (Socialism and Liberty Party), a small leftist party.
For both, he had encouraging words about their promising futures – which stood in sharp contrast with the formal remarks about who would replace him as candidate for his Workers' Party (PT) in the elections.
"Now there are no strong names on the team. (Former ministers) Jaques Wagner, Fernando Haddad are qualified but they don't pack a punch, so Lula could opt for someone else on the left, not necessarily from the PT," Cesar said.
But it is still too early to speak of anything like a realignment in Brazil's fractured political arena.
"Maybe Lula threw this out as bait to see how people would react, knowing that the whole country was watching and that Globo (TV) was transmitting his remarks live," Cesar said.
With Lula in prison and his participation in the elections likely over, there may be a rush to fill the hole left by the man who was the clear leader in all the polls.
Although most of Lula's rivals have, until now, remained cautious, things are now likely to gain momentum as they scramble for top billing.
"The situation is now less predictable and more splintered because there is no longer anyone who polarizes things like Lula," said Oliver Stuenkel, an expert in international relations at the Getulio Vargas Foundation in São Paulo.
This split could counterbalance the rise of the extreme right, whose candidate Jair Bolsonaro has been trailing a distant second in the polls.
"The person who is going to suffer most from the fact that Lula is out is Bolsonaro because he has risen on the strength of being an anti-Lula candidate and now the campaign is going to be much less polarised," said Stuenkel.
A judicial maze
As the frenetic developments of recent years have shown, things in Brazil can change very quickly.
If Lula still had a chance early Wednesday of avoiding prison for a few more months, by Thursday he was facing an order to be jailed within 24 hours.
On Friday, he was holed up with supporters, defiantly challenging the authorities, but by Saturday, he had agreed to surrender – ending the day behind bars.
In the coming days, a divided Supreme Court will meet to discuss a law that could potentially spring Lula from jail until all of his appeals have been exhausted.
"In Brazil, everything is possible so he could spend a week in prison and then, a judge from the Supreme Court could send him to house arrest, for example," said Stuenkel.
"For a long time, we have been living with the unprecedented, so it is very difficult to predict what is going to happen."
by by Rosa Sulleiro