Rocinha slum in BrazilSergio Moraes / Reuters

RIO DE JANEIRO—On August 31, Brazil made the end of 13 years of Worker’s Party (PT) rule official. By a count of 61-20, the senate voted to impeach Dilma Rousseff, the country’s first female president, for manipulating the federal budget to conceal deficits.

Rousseff’s opponents viewed Wednesday’s news as an indictment of her disastrous management of the economy, and as a necessary change amid the massive corruption scandal surrounding state-run oil company Petrobras. But her supporters have labelled her impeachment a “parliamentary coup,” since many of the very politicians supporting the charges against her have been officially implicated in the Petrobras probe, unlike Rousseff herself.

The PT leaves behind a mixed legacy, as well as substantial pockets of support for its progressive social policies, particularly among the poor. The party’s investments in infrastructure, its university affirmative-action policies, and Bolsa Família, its popular social-welfare program that offered financial assistance to needy families, helped boost its standing among the working class, even as the anti-PT tide crested in recent months. An April poll by the group DataFolha found 47 percent of Brazilians in the country's lowest income bracket (a  family income of up to roughly $540 U.S. dollars per month) said Rousseff’s predecessor, PT co-founder Luiz Inácio Lula da Silva, was the best president Brazil ever had.

After the vote, Rousseff defiantly slammed her impeachment as a sexist, homophobic, racist coup. She also addressed those who had vaulted into the middle class during the country’s commodity-fed, PT-led boom years. “I'm speaking principally to the Brazilians who, during my government, overcame misery, accomplished the dream of having their own house, started to get medical attention, entered into university, and stopped being invisible in the eyes of the nation, moving toward having rights that were always denied them,” she said. “We accomplished, with success, a project that brought about the biggest social inclusion and reduction of inequalities in the history of the country.”

As Rousseff’s odds of escaping impeachment dwindled, Rocinha, the largest favela in Rio de Janeiro, resigned itself to the reality of life under the government of the center-right, pro-business Michel Temer, Rousseff’s replacement and former vice president, who many residents I spoke to fear will erode labor protections and deprioritize health and education spending. In their eyes, the business and political elites in his coalition, led by the Brazilian Democratic Movement Party (PMDB), have disregarded the medium-term costs of impeachment for the poor, as they scrambled to leverage the Petrobras scandal and Brazil’s sputtering economy for their own political gain. They worry about Temer’s suspension of a government program to combat illiteracy, and his plans to reportedly expand the use of private prisons; his allies in the so-called “bullet caucus,” a bloc of pro-military lawmakers in Brazil’s congress, hope to see expanded access to firearms nationwide.

On August 28, the Sunday before Rousseff’s impeachment, Rocinha was the site of “Funk Without Fear,” a politically themed party featuring funk carioca, a popular genre of irreverent electronic dance music. The neighborhood of some 100,000 saw its fortunes rise under Rousseff and the PT’s 13 years in power, with more of its residents able to attend university, open small businesses, and even purchase satellite TV dishes. Hence it was a logical site for what was, effectively, a wake for the party’s political legacy. “For all the problems with the PT,” said the 29-year-old event planner Michelle Lacerda, “it consistently gave us a lifeline here.”

The newly installed Temer promises to enact economic reforms that will improve the livelihoods of working Brazilians. “I just don’t believe he’ll govern in the full public interest, because his mandate doesn’t come from the people,” Lacerda said. She pointed out that one of Temer’s reforms, so far, has been to give federal judges a 41 percent raise.

The main objective of “Funk Without Fear,” according to its organizers, was to protest the government of Temer (himself accused in plea-bargain testimony of requesting bribes. He has been banned from running for public office for eight years for violating campaign finance laws). Why funk? Fillipe Dos Anjos, secretary of the Federation of Favela Associations of Rio de Janeiro, an advocacy group for favela residents across the city, explained that the genre “is uniquely Rio and it came out of Rio’s favelas, which stand to lose dramatically with this impeachment.” Dos Anjos, a 32-year-old former navy member who lives in the favela of Santo Amaro and studies history at the State University of Rio de Janeiro, hoped the event would show that favelas are determined to be heard at a time when an icon of the Brazilian left is on life support. “Rio funk is about showing that creativity and solidarity are what make favelas great—things that money alone can’t buy,” he said. Funk, then, offered an appropriate, rambunctious soundtrack for the end of Rousseff. What lay ahead with Temer was uncertain.   

While plans for Sunday’s event began auspiciously, things soon took an ominous turn. By midday, a five-meter-tall sound system had been set up inside the fenced-in futsal, or miniature soccer court, at one entrance to Rocinha. “The intention is: Fill up the futsal court and have people dancing in the street,” MC Galo, a funk artist from the community, said. Organizers and local police commanders had sparred earlier in the week over the right to host the event, which organizers called a peaceful assembly, permitted under Rio state law. But the police said it required more paperwork, despite giving their verbal authorization. Festival organizers decided to speak directly with police on Sunday to see what size performance might be possible, but on site, “an officer told organizers if we turned on that sound system inside the futsal court, Rio’s elite military police squad would invade the event, attack the band, and throw pepper spray on the crowd,” Galo said.

Eventually, organizers were allowed to blast music from a speaker placed in the street running adjacent to the futsal court. Soon, residents streamed toward the sound as the emcees launched into their set: an anthem to favelas, a song decrying the daily violence of the war on drugs, and another repudiating police suppression of funk parties. The crowd of over 200 danced to classic ’90s hits like “The Gorilla Dance,” belted the hymn of a Rio soccer team popular among the working class, and chanted “Out With Temer!” After issuing an appeal for an end to violence in favelas, one emcee led a simple call-and-response chant of “I want to live!” Thirty meters away, over a dozen police stood watch over the event. Three carried rifles.

The Rio police declined on-site to answer questions about the police’s attempted prohibition of the event. In an email, a police spokeswoman wrote that the solicitation for the event “did not follow some demands from a 2015 city decree about requirements for events in favelas.” To Guilherme Pimentel, a lawyer who volunteers with a group providing legal support to funk artists, the attempt was typical behavior for Rio’s PMDB state government, which “sends in the police as a reaction to issues that should have other solutions,” thus in his view “criminalizing poverty.” Pimentel said “arbitrary prohibitions of freedom of expression” are a relic of Brazil’s authoritarian past—a past he fears may prove resurgent under Temer.

Yet, it was the PT that caved on its promises to rein in the police and offer a vision for public security more respectful of human rights. In 2008, the party worked with the PMDB to institute the police pacification program, which sought to use community-policing strategies to improve relations between the police and poor communities. But the program faltered due to budgetary cuts, leadership lapses, and the resistance of powerful, tough-on-crime local lawmakers. In an infamous case in 2013, officers in Rocinha tortured and killed Lacerda’s uncle, a bricklayer. The PT, favela residents soon realized, would not be the party to finally change a police force long symbolic of the state’s past as a military dictatorship.   

Backsliding on police reform was just one element of the PT’s conservative shift. Over the years, it pushed its agenda through Brazil’s fractious congress by relying on its alliance with the PMDB, gradually pulling away from its leftist base. It yielded to increasingly powerful right-wing pressure in Brazil, which also led Rousseff to back a pro-market austerity regime after her 2014 reelection, further alienating the party’s base and leading to the country’s current political turmoil.

As Sunday’s funk event rolled into its fourth hour, MC Leonardo, who was born in Rocinha, drew rapt attention with a song written a few years after the launch of the favela pacification program, when it began to draw criticism for abuses. The DJ paused so Leonardo could cry out, a cappella. “People are planting seeds of ill, wanting to harvest something good,” he said. “It’s all wrong.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.