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.
"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."
A nation divided
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."
"Trump of the Tropics"
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 Democracy was named as one of four films competing in the Oscar's "Best Documentary" category, Bolsonaro said he hadn't seen it -- but was sure it was "garbage" and should be included in the fiction category.
The parallels between Brazil's "Trump of the Tropics" and another populist leader known for misogynist comments and attacking the media are never explicitly drawn in the film, but for Costa the similarities are very present.
"It is a cautionary tale of how democracy is eroded," she said. "There are messages for Chile, Bolivia, Hong Kong, the UK and the United States. They can learn about their own political crisis through the film."
She says she hopes the Oscar nomination will fuel debate. "I'm honored and thrilled with the attention the film can get at a moment when this is the most important thing people should be thinking about."
Polarization, censorship and manipulation has only increased in Brazil during Bolsonaro's first year in power, she says, citing increasing deforestation of the Amazon, the defunding of agencies charged with protecting the environment and indigenous communities, and growing attacks on the media.
"It gets worse with each plot twist," she says.
Lula was released from jail last November thanks to a Supreme Court ruling that allows defendants to remain free while their appeals are pending. He has embarked on a nationwide tour aimed at galvanizing support for the Workers Party and his legacy.
But Lula's release did little to tarnish Bolsonaro's popularity, which has bounced back in recent months amid signs he is making good on his promises to improve the economy and crack down on crime.
According to a recent poll commissioned by transport sector group CNT and carried out by the MDA polling company, Bolsonaro's personal approval rating rose to 47.8 percent in January from 41 percent in August -- virtually tying with the 47 percent of Brazilians who disapprove of him.