In this March 2, 2016 file photo, Brazil's President Dilma Rousseff talks with her Vice President Michel Temer at Planalto presidential palace in Brasilia, Brazil (Photo: AP)
Michel Temer used to be known in Brazil as a behind-the-scenes operator, but that was before he pulled the trigger on a masterful bid to topple his boss, President Dilma Rousseff, and take her job.
After months of playing his cards close to his chest, the vice president was to take over as president Thursday after the Senate voted to open an impeachment trial against Rousseff.
Brazil's first female president was suspended pending judgement for up to six months, and Temer, a constitutional scholar who kept a low profile until now, takes her place.
Rousseff's running mate-turned-nemesis was due to announce a business-friendly cabinet and announce plans to pivot away from 13 years of leftist policy in a bid to get the ailing South American giant's economy out of recession.
But with popularity ratings as dismal as Rousseff's and many of his allies implicated in corruption, Temer will face a tall task restoring stability in Brazil.
The 75-year-old lawyer had long been a backroom wheeler-dealer. He was perhaps best known to voters for having a 32-year-old former beauty contestant as a wife.
But as Brazil's economic boom turned to spectacular bust and a corruption scandal at state oil company Petrobras tainted nearly the entire political class, Temer slowly emerged from the shadows to seize the starring role.
Rousseff and her running mate always made an awkward couple. As head of the PMDB, a centrist party, Temer represented the biggest force in the former leftist guerrilla's shaky coalition.
For years, the PMDB played the role of kingmaker, content with pulling the strings and keeping the keys to the government pork barrel.
Temer was cautious, gradually making his disapproval of Rousseff known as the momentum to impeach her built.
In October, he published a document called "A bridge to the future" in which he criticized "excesses" in government policies. And in December, he complained of being treated as "a decorative vice president."
But while lower-level PMDB supporters liked to refer to him as "President Temer," he insisted he had no such ambitions, except perhaps for the next scheduled elections in 2018.
Finally, in March, he came out into the open, calling on the PMDB to abandon the government and go into opposition.
Temer followed that up by brazenly leaking an audio recording of himself practicing the speech he'd give if he were to replace Rousseff.
In it, he said his "great mission from now is the calming of the country, the unification of the country."
The president calls him a leading "conspirator" in the impeachment process, which she says has turned the commonly accepted practice of papering over shortfalls in the government's accounts into an excuse for a "coup."
For someone known as a colorless political insider, Temer has a surprising side.
Not only is he married to a woman less than half his age, but it is his third marriage. He has five children born across four decades.
Nor is he the stuffed suit that he might appear to be on television. In addition to a highly regarded work on constitutional law, the son of Lebanese immigrants has authored a book of poetry.
He has served three times as speaker of the lower house of Congress and has been president of the PMDB for 15 years.
Temer does not apologize for his dour manner, telling Piaui magazine in 2010 that joking is not his thing: "I don't know how to do this. If I tried, it would be a disaster."
That persona may account for his rock-bottom popularity -- only two percent of the country would vote for him in a presidential election, according to a recent poll.
Political analysts say his most immediate threat comes from the Petrobras scandal, in which a host of powerful PMDB colleagues are implicated.
Temer himself is not under investigation, but a key witness has accused him of participating in schemes to bilk the company of billions of dollars.
The new interim president has also been found guilty of campaign finance irregularities and could be banned from seeking elected office for eight years. But by entering the presidency via Rousseff's impeachment, that won't be a problem.