SAO PAULO, Brazil — The 50 young Brazilians who gathered in Sao Paulo’s statehouse one recent evening looked nothing like the old white men who traditionally fill its seats. Raising their cellphones as if in a salute, the young people live-streamed, photographed and tweeted their actions.

These millennials were forming a coalition of political “start-ups,” groups that operate independently from Brazil’s parties and have been proliferating in the run-up to national elections in October.

Dozens of these groups have arisen since a giant corruption scandal tarred the political class in South America’s largest country. Sustained by rage-filled Facebook pages and a growing distrust of the political establishment, these civic movements are introducing a new element to Brazil’s election campaigns. So far, they’ve resulted in 500 candidates running for office at the municipal, state and presidential levels in elections this fall — an estimated 2 percent of prospective competitors.

“The current leadership does not represent us,” said Ilona ­Szabó, who is 39 and a founding member of Agora, or Now, a group calling for more ethical behavior in politics and less economic inequality. “We need to create new groups made up of our generation.”

These movements hope to translate Brazilians’ outrage into the kinds of political action seen in the United States and France, where outsiders such as President Trump and President Emmanuel Macron used popular support to outmaneuver the political systems.

The new groups span the political spectrum, from the libertarian Movimento Brasil Livre, known as the Brazilian version of America’s tea party, to the leftist Bancada Ativista, whose focus on social justice resembles that of the Occupy Wall Street movement.

Many of the Brazilian groups trace their roots to 2013, when a protest over a hike in bus fares morphed into a countrywide popular upheaval that shook the political establishment. Since then, the crisis of legitimacy for Brazil’s political system has only deepened, fueled by the controversial impeachment of former president Dilma Rousseff and a widening corruption investigation known as Operation Car Wash.

The sprawling probe has tainted the current president and implicated dozens of cabinet ministers and senators. Faith in Brazilian political institutions is plunging, with a 2017 Ipsos poll finding that only 6 percent of Brazilians feel represented by the politicians they voted for.

The country’s leading contender for the presidency remains former president Luiz Inácio Lula da Silva, who may be barred from running because of a corruption conviction. In Brazil, voting is mandatory. If Lula is struck from the ballot, up to one-third of Brazilians would submit blank protest votes, according to figures recently released by Datafolha, a Brazilian polling agency.

With optimistic names such as Renovate Brazil and I Believe, the emerging movements represent an effort to channel the disillusionment stemming from the recent turmoil into something positive.

“After Car Wash, everyone had blood in their eyes,” said Matheus Codeco, a 19-year-old public administration student from Rio de Janeiro and a member of Acredito, a movement calling for a more transparent and diverse National Congress. “It woke people up to a scheme that everyone knew was going on, but at a scale nobody could imagine. We want to create a collective strategy to move forward.”

In Brazil, where almost all established political parties find themselves sullied by corruption scandals, these new groups have produced a different breed of candidate. Luciano Huck, a popular television host and the face of the Agora movement, polled among the top three candidates in this year’s presidential race before he bowed out last month after facing pressure from his station.

Lesser-known candidates face a steeper road. These new movements still have to play by old rules. Brazil’s system grants established parties federal funding for campaigns and free television airtime for ads. The movements, on the other hand, rely on individual donors for funds and struggle to compete against deep-pocketed parties.

The lack of airtime means the movements largely try to spread their messages via social media, where fake news and polarization are rife. There are no primary races within Brazil’s parties, which walls off the establishment from upstart voices.

“The current system is designed to ensure that the people who are in power stay in power,” said Pablo Ortellado, a public policy professor at the University of Sao Paulo. “Launching candidates is one thing. Winning will be much harder.”

Still, many of these movements have achieved a competitive edge online, where their sense of anger and frustration inspires millions of followers. Political parties are often eager to tap into that energy, especially at the local level, where the movements have won key legislative and electoral victories.

Members of the Movimento Brasil Livre, for example, attracted votes for businessman and reality TV star João Doria, who won Sao Paulo’s mayoral race by a landslide in 2016. The movement has continued having a hand in his policies. Doria significantly scaled back regulations on ride-hailing apps such as Uber this year after facing pressure from the libertarian group.

For their part, the movements also have something to gain in allying with political parties. Brazilian law mandates that candidates have a party affiliation. While most movements reject the existing party structure, they have little choice but to strike up partnerships of convenience with existing parties to launch candidacies.

Some have found a home in weaker parties where they can more easily champion their causes. Agora recently signed a partnership to launch candidates through the Socialist People’s Party.

The groups are keenly aware of the fate of their sister movements around the world, many of which burn out when online momentum fails to produce traction in the offline world.

“If you look at Occupy, it had a presence but no actionable agenda. What does it occupy now?” said Szabó, the founder of Agora. In an attempt to maintain its momentum offline, Agora requires all board members to commit to two years of public service.

Eduardo Jorge, a veteran politician and a co-founder of the dominant Workers’ Party, said the country’s strict party rules must be reformed to make space for new players.

“Facebook offers an extraordinary space for democracy to flourish,” Jorge said at a recent panel on democratic movements. “But without political reform, you won’t see results.”

Despite the challenges they face, the new political movements could be setting the stage to dislodge the existing party structure. After all, veterans of Brazil’s current political class, like Jorge, were launched into politics through similar movements that gnawed at Brazil’s dictatorship for years before ultimately bringing it down three decades ago.

“The student movement in the ’60s was what produced today’s political class,” said Alexandre Bandeira, a political strategist in Brasilia. “We are still going to see the fruit of these movements participating in politics. It’s a process.”