Brazil's President Dilma Rousseff is to face trial after the Senate voted to impeach and suspend her.
Ms Rousseff is accused of illegally manipulating finances to hide a growing public deficit ahead of her re-election in 2014, which she denies.
Senators voted to suspend her by 55 votes to 22 after an all-night session that lasted more than 20 hours.
Vice-President Michel Temer will now assume the presidency while Ms Rousseff's trial takes place.
The trial may last up to 180 days, which would mean Ms Rousseff would be suspended during the Olympic Games in Rio de Janeiro, which start on 5 August.
Ms Rousseff made a last-ditch appeal to the Supreme Court to stop proceedings, but the move was rejected. Her suspension brings an end to 13 years of the rule of her Workers' Party.
Ms Rousseff, 68, who was first sworn into office in January 2011 and started a second term in 2015, has called the steps to remove her a "coup".
In a speech at the end of the all-night Senate session, attorney general Jose Eduardo Cardozo said that the impeachment request did not have legal basis and that the opposition wanted to remove a democratically-elected president.
He said senators were condemning an "innocent woman" and that impeachment was a "historic injustice".
Who is stand-in President Michel Temer?
Michel Temer became interim President as soon as Ms Rousseff was suspended.
- The 75-year-old law professor of Lebanese origin was Ms Rousseff's vice-president and was a key figure in the recent upheaval
- Up until now, he's been the kingmaker, but never the king, having helped form coalitions with every president in the past two decades
- He is president of Brazil's largest party, the PMDB, which abandoned the coalition in March
- In recent months, his role has become even more influential; in a WhatsApp recording leaked in April, he outlined how Brazil needed a "government to save the country".
Why did senators seek impeachment?
All 71 senators present for the vote made their case for or against impeachment in 15-minute slots. They finished at 05:45 local time (08:45GMT), more than 20 hours after the session opened.
In the Senate, the arguments given for the trial were mainly economic; many blamed President Rousseff for the dire straits the country's economy is in.
Brazil is suffering from its worst recession in 10 years, unemployment reached 9% in 2015 and inflation is at a 12-year high.
- "Populist governments always act with fiscal irresponsibility and when they fail they appeal to the old 'us vs them' argument" - Senator Aecio Neves, who lost to Ms Rousseff in the 2014 presidential election
- "Impeachment is a tragedy for the country. It is a bitter though necessary medicine. But having the Rousseff government continue would be a bigger tragedy. Brazil's situation would be unbearable" - opposition senator Jose Serra, a candidate for foreign minister under Mr Temer
- Former football player turned senator Romario said Brazil was in "a very serious crisis" before revealing that "after much thought" he had decided to back her impeachment trial
What did Dilma Rousseff's backers say?
Those arguing against impeaching Ms Rousseff, Brazil's first female president, repeated her comments that it was tantamount to a coup d'etat.
- "The Brazilian elite, the ruling class, which keeps treating this county as if it was their hereditary dominion, does not appreciate democracy" - Humberto Costa, Workers' Party leader in the Senate
- "Today we are seeing an attempted takeover of power which calls itself impeachment" - Senator Telmario Mota, who said the impeachment proceedings were "born of revenge, hatred and revenge"
- Workers' Party Senator Fatima Bezerra called the proceedings "a farce", adding: "Those who back this coup d'etat won't ever be forgiven"
Analysis - Jefferson Puff, BBC World Service correspondent, Rio de Janeiro
Brazilians are extremely divided and the polarisation between groups that are in favour of and against impeachment can be seen in social media and at the latest street protests.
Last night, there were protests all over the country, and although much smaller than expected, they did lead to scenes of confrontation between opposing groups. Police resorted to tear gas and pepper spray to contain fights.
It is expected that Ms Rousseff will leave the Presidential Palace this morning and, after a short speech, a video message from her to the nation will be posted online. The video is expected to frame the impeachment process in the strongest terms as a coup d'etat and make the point that Mr Temer is taking over office without having been elected in a legitimate popular vote.
Analysts and the Brazilian press have questioned how this will resonate among the public. On the one hand, social movements such as national unions and landless workers' groups have said they will "paralyse" the country. But, on the other, it's important to remember their leaders were in touch with Mr Temer weeks ago trying to negotiate.
Many of these groups will gather to support Ms Rousseff as she leaves the Presidential Palace, but it is uncertain how the streets will react throughout the day and how much popularity the new government will enjoy once it takes office.
What happens next?
The 180 days allocated for the trial to take place expire on 8 November.
Before Thursday's vote, the Lower house of Congress had already pushed for impeachment. Now that process has started, there are two possible outcomes for Ms Rousseff.
How Brazil reacted - from BBC Monitoring
Several of Brazil's media outlets published their long-awaited headlines just minutes after President Rousseff's impeachment was confirmed.
Their readiness to bid farewell to the centre-left president comes as no surprise, given the active role that major right-leaning media networks played in the run-up to the vote.
The headlines are simple. Right-leaning network O Globo features a photo of President Rousseff looking dejected with the headline "Senate removes Dilma by 55 votes to 22".
Centre-right daily Folha de Sao Paulo leads with the headline "Dilma is removed". Their coverage notes that this is the second time since the end of Brazil 's military dictatorship that a president has been impeached.
Correio Braziliense also highlights this fact in an article entitled "Temer: from decorative vice to president", alluding to Temer's relative lack of prominence until now.
Left-leaning website Diario do Centro do Mundo registers its discontent with the headline "With a scoreboard of 55 to 22, the coup is approved and Temer takes up the presidency". In general, the smaller, left-leaning press has been slower to publish its reaction to the finale of what has often been referred to as Brazil's real-life House of Cards.