Sao Paulo (CNN)Brazilian director Petra Costa says her Netflix documentary should serve as a cautionary tale for the United States and the world at large.
This Oscar-nominated Brazil documentary is a warning for democracies around the world
"It talks about the global phenomenon of how democracy dies today. Not with tanks, not with the military taking over," she said in an interview with CNN. "But with the erosion of institutions, the spread of fake news, huge social media campaigns perpetrated and maybe paid for by corporations interested in the demise of democracy."
Her Oscar-nominated film, "The Edge of Democracy," chronicles Brazil's recent political upheaval, and follows the impeachment of a president, the imprisonment of a historical leader and the rise of a right-wing populist.
She documents Brazil's still-festering divisions through a personal rather than journalistic lens, narrating events in the first person and using the political battles within her own family as a backdrop.
The idea first came to her in 2016, when protests erupted demanding the impeachment of then-President Dilma Rousseff, accused of illegally manipulating government accounts to hide a growing deficit in order to secure her re-election.
"The level of hatred and intolerance was so high. I had never seen it before. The media was portraying these protests as great patriotic protests, not showing the level of hatred and not showing people asking for the return of the dictatorship," Costa said.
"I had the feeling that something very scary was happening."
Rousseff's impeachment exposed a deep polarization in Brazil.
When our own CNN crew joined hundreds of journalists covering the trial in Brasília in 2016, we found that a huge metal divider had been erected on the central esplanade to separate angry rival marches. At the end of the hours-long vote, Rousseff's detractors cheered and chanted "Ciao darling!" while her supporters drifted away in tears.
Supporters of Rousseff and the Workers Party declared the trial a political coup to remove the left-wing party that had been in power for 13 years.
But many Brazilians taking to the streets blamed Rousseff for a ballooning economic recession, and linked her to a massive bribery scandal engulfing the state-run oil company Petrobras and many leaders of the governing Workers Party -- though Rousseff herself was never implicated during the corruption investigation known as Car Wash.
The jailing of former President Luiz Inacio Lula da Silva, Rousseff's mentor and predecessor, fueled a narrative of corruption.
The documentary opens with the man known popularly as Lula being driven through a sea of supporters on his way to prison.
My voice from CNN's coverage is one of the first you hear: "A stunning blow for a man who was elected president twice and left office with an approval rating over 80 percent. In fact, he was already planning his comeback, he was leading in the polls for presidential elections next year."
While the film openly discusses the web of corruption that had ensnared all of the country's top political parties, including the Workers Party, Costa attributes Rousseff's removal and Lula's arrest to Machiavellian manipulations by the country's wealthy elite.
"The Constitution is not enough to protect democracy. You need mutual respect and self control," she said in the interview. "What protects democracy is not the Constitution. Through the Constitution you can destroy your political opponent in so many ways."
After his arrest, Lula was barred from running in the next election, paving the way for Jair Bolsonaro, a former-army captain and fringe lawmaker who had positioned himself as an anti-establishment candidate, to take the lead.
For years he was best known for his inflammatory attacks on women, gays and minorities and his defense of the country's military dictatorship.
Costa worked for months to gain extraordinary access to both Rousseff and Lula. She says that Bolsonaro, who had just declared his intention to run for president, granted her an interview "immediately."
"They call me rude, homophobic, fascist, etc. I'm a hero. I get stronger every day in the public opinion," he tells her as they walk through the halls of Congress in the film.
After "The Edge of De