The Brazilian senate has impeached Brazilian President Dilma Rousseff for illegally manipulating government accounts.
Here we take a closer look at the impeachment proceedings and how we got here.
What was Ms Rousseff accused of?
Simply put, Ms Rousseff was accused of breaking fiscal laws.
She was found guilty of moving funds between government budgets, which is illegal under Brazilian law.
Her critics said she was trying to plug deficit holes in popular social programmes to boost her chances of being re-elected for a second term in October 2014.
Ms Rousseff denied having done anything illegal and said that moving money between budgets was common practice among her predecessors in office.
Who wanted her gone?
Ms Rousseff alleged that the impeachment proceedings were tantamount to a coup d'etat against her.
She said the proceedings were being used by her enemies to remove her from office without having to wait for the next presidential election.
Her main rival and a driving force behind the impeachment was the former speaker of the house, Eduardo Cunha.
Mr Cunha's opponents said he was a political opportunist who had switched sides to increase his influence and that of his PMDB party.
To back up their claim, they pointed to the fact that the PMDB stood to win from the suspension of Ms Rousseff.
Under Brazil's constitution, the vice-president takes over on an interim basis if the president is suspended from office.
That is how the PMDB's Michel Temer went from being Ms Rousseff's vice-president to inaugurating the Olympic Games as Brazil's acting president.
However, things did not work out smoothly for Mr Cunha either. He had to resign in July over corruption allegations, which he denies.
What do Brazilians think?
Ms Rousseff's approval ratings have plummeted from their all-time high of 79% in March 2013 to about 10% in March 2016.
There were mass demonstrations in major Brazilian cities demanding that she resign.
But there were also smaller rallies in her support.
Many Brazilians said they were fed up with the high levels of corruption in Brazilian politics.
But with some of the politicians who backed her impeachment also under investigation for either mismanagement or corruption, no party seems untouched by the allegations.
What happened when?
The lower house of Congress voted on 17 April on whether impeachment proceedings against Ms Rousseff should go ahead.
In a late-night session, 367 out of 513 lawmakers voted in favour, comfortably reaching the two-thirds threshold needed for the matter to be passed to the Senate.
A vote in the Senate followed in May, in which 55 senators voted in favour of the impeachment process going ahead and 22 against.
Another vote was held in the Senate in August which the senators decided by 59 to 21 votes that there was enough evidence against Ms Rousseff to proceed to the trial phase.
On 31 August, the Senate voted 61 to 20 in favour of Ms Rousseff's impeachment.
What happens next?
Michel Temer, who served as Ms Rousseff's vice-president and who has been the acting president since her suspension in May, will be officially sworn in as president later on Wednesday.
He will serve out Ms Rousseff's term in office, which is due to end on 1 January 2019.