When corruption allegations erupted against President Michel Temer, the unpopular Brazilian leader seemed almost sure to tumble within days. That was two weeks ago.
The wily politician faces far more serious accusations than the charges that led to his predecessor, leftist president Dilma Rousseff, being impeached in 2016. Yet so far, he has defied expectations by finding ways to hang on.
Political analyst Carlos Pereira, from the Getulio Vargas Foundation in Rio de Janeiro, says Temer is still close to falling.
"He's in the intensive care unit," Pereira said.
However, the conservative politician -- investigated over alleged corruption and obstruction of justice -- has already managed to at least postpone several serious threats.
After the publication on May 17 of a secret recording in which he is allegedly heard agreeing to paying hush money, Temer faced a barrage of calls for his resignation. Petitions for his impeachment piled up at the lower house of Congress, including one from the influential Brazilian bar association.
Demonstrations, one of which drew tens of thousands of people in the capital Brasilia, demanded snap elections.
Yet for any of that to happen, the government's support in Congress would have to collapse.
Temer, arguing that his rule has helped Brazil creep out of a two-year recession, managed to stem the flow. Crucially, he succeeded in keeping his PMDB party's main coalition partner, the PSDB social democrats, from defecting on the weekend after the scandal broke.
His team then focused fire on the tape recording that forms the central piece of evidence against him, saying it had been doctored. The issue was enough to muddy what had been portrayed only a few days earlier as crystal clear waters.
Next week, Temer will meet his next big challenge. This time, it isn't his corruption scandal, but a case in the Supreme Electoral Tribunal where Rousseff's 2014 re-election, with Temer as her then vice president, faces annulment if the court decides that it was illegally financed.
Previously, this had been considered something of a sideshow, but for many the court now has the opportunity to push Temer aside without the drawn-out trauma of an impeachment process.
Yet here, too, there may be no quick solution. The president's allies say one of the judges could ask for more time, adjourning the case.
"The more time he wins, the more chance there is to escape death," Pereira said.
What would be fatal, according to Pereira, is if Temer hangs on but becomes a lame duck, unable to pass the economic austerity reforms at the center of his agenda.
"If he doesn't convert that extra time into getting reforms approved, then his survival hopes drop greatly."
The reforms, especially cuts to the pension system, are hugely unpopular and members of Congress face elections, along with a presidential poll, in October 2018.
However, Temer hopes that new signs of a feeble exit from recession -- GDP rose in the first quarter of this year after eight straight quarterly falls -- will help persuade Congress to give its backing.
And the biggest brake on the initial rush to call for Temer's exit is that there is no clear candidate to take up the interim role until the end of next year.
"There's no natural substitute for Temer, unlike in the case of Rousseff, where you had the clear alternative in her vice president Temer," said Sylvio Costa, editor of specialist website Congresso em Foco.
Under the constitution, the speaker of the house would take over for 30 days if Temer resigns. During that time, Congress would elect a new president to finish the mandate.
But despite preliminary discussions, no consensus candidate has emerged, meaning there would likely be more instability if it came to having to choose.
Another problem is that some of the most obvious candidates are themselves tainted by corruption probes.
"It's difficult to find someone who is clean and who backs the reforms," Costa said.
Despite that, "Temer could fall at any time," Costa said, noting the constant surprises thrown up in Brazilian politics.
Or, as one anti-corruption prosecutor put it, Brazil's turmoil no longer seems to mirror the Netflix political series "House of Cards."
"What we're seeing today is more like 'The Walking Dead' with its hordes of living dead," said Carlos Fernando dos Santos Lima.