BRASÍLIA — One of Brazil’s longest-running spectacles features a dizzying array of characters whose theatrics appear on millions of television sets most nights.
The ever-changing cast of 594 includes suspects accused of murder and drug trafficking, aging former soccer players, a judo champion, a country music star and a collection of bearded men who have adopted roles as leaders of a women’s movement.
The cast even includes a clown who goes by the name Grumpy.
But these are not actors. They are the men and women who serve in the national legislature.
Democracy can be a mystifying, rough-and-tumble affair anywhere, butBrazil’s Congress has few equals.
As the nation endures its worst political upheaval in a generation, the lawmakers orchestrating the ouster of President Dilma Rousseff — who was suspended on Thursday and faces an impeachment trial on charges of manipulating the budget — are coming under renewed scrutiny.
More than half of the members of Congress face legal challenges, from cases in auditing court involving public contracts to serious counts like kidnapping or murder, according to Transparency Brazil, a corruption monitoring group.
The figures under investigation include the president of the Senate and the new speaker of the lower house. Just this month, the previous speaker, an evangelical Christian radio commentator fond of posting biblical verse on Twitter, was ejected to face trial on charges that he secreted as much as $40 million in bribes into Swiss bank accounts.
Many of the legislature’s problems stem from the generous rewards to be found in Brazil’s hydra-headed party system, an unwieldy collection of dozens of political organizations whose names and agendas often leave Brazilians scratching their heads.
There is the Party of the Brazilian Woman, for instance — a group whose elected members in Congress are all men.
“The electoral process allows many distortions,” said Suêd Haidar, the party’s founder and president. She sighed, acknowledging that many of the men who join have little interest in promoting women’s rights.
One of those who joined the party, Senator Hélio José da Silva Lima, was accused of sexually abusing a young niece last year, though charges were later dropped. “What would become of us men if there were no women by our side, to bring us joy and pleasure?” he was quoted as saying in the Brazilian news media when asked about his decision to join the women’s party.
The same public fury over endemic corruption and governmental mismanagement that helped drive Ms. Rousseff from power has long been directed at the cabal of politicians, most of them white men, whose penchant for back-room deals and self-enrichment has become part of Brazilian lore.
“The reputation of the political class in Brazil really can’t go any lower,” said Timothy J. Power, a professor of Brazilian studies at Oxford University.
“People compare the legislature to the ‘House of Cards,’” he said, referring to the Netflix political drama, “but I disagree. ‘House of Cards’ is actually more believable.”
With 28 parties holding seats, the Brazilian Congress is the world’s most fractured, according to Mr. Power. The runner-up, Indonesia’s legislature, has a third fewer parties.
“Brazil is not an outlier, it’s a freak,” said Gregory Michener, the director of the public transparency program at Fundação Getúlio Vargas, a university in Rio de Janeiro.
The parties tend to use words like “Democratic,” “Christian” and “Republican” in their names, though “Labor” has them all beat. Among them are the Labor Party of Brazil, the Christian Labor Party, the Brazilian Labor Renewal Party and the National Labor Party. For the sake of variety, there are also the Workers’ Cause Party and Ms. Rousseff’s once-dominantWorkers’ Party.
“The entire system is a monster,” said Juremir Machado da Silva, a columnist at Correio do Povo, a newspaper in the southern city of Pôrto Alegre.
Polling has shown that more than 70 percent of Brazilians cannot recall what parties the candidates they elect belong to, and that two-thirds of the electorate has no preference for any party.
More important, experts say, is that most of the parties embrace no ideology or agenda and are simply vehicles for patronage and graft. In a typical four-year term, one in three federal legislators will switch parties, some more than once, according to a tally by Marcus André Melo, a political scientist at the Federal University of Pernambuco.
Brazilian lawmakers are among the world’s highest paid, scholars say, withgenerous stipends that go well beyond their monthly salaries. They also receive free housing, health care and large staffs and enjoy special immunity from prosecution. Only the overworked Supreme Court can try them on criminal charges, a process that can take years.
“The only thing that’s better than being a political party in Brazil is to be a church,” said Heni Ozi Cukier, a political scientist at the university E.S.P.M. in São Paulo. “They’re opportunists who are looking for something that gives them power, influence, protection.”
Forming a party requires collecting 500,000 signatures. Mr. Cukier said 62 parties were seeking official recognition, including one named after a soccer team.
Although Brazil’s president leads one of the world’s largest countries, he or she must forge coalitions with up to a dozen parties to get legislation passed in Congress. The price of loyalty is often a ministerial post, or three, depending on how many votes the party can deliver.
In some instances, cooperation involves the illicit exchange of cash. In 2005, a scandal known as mensalão, or big monthly payment, revealed the pervasiveness of such arrangements. To win votes in Congress, the party of President Luiz Inácio Lula da Silva, Ms. Rousseff’s mentor and the standard-bearer of the Workers’ Party, had been paying compliant lawmakers a monthly stipend of $12,000.
The most recent graft scandal — known as Operação Lava Jato, or Operation Car Wash — has proved even bigger, with billions of dollars in bribes directed to political parties from the national oil company, Petrobras. More than 200 people, from business tycoons to party leaders, have been implicated in the scandal, and their numbers are expected to grow.
Public fury over the scheme played a pivotal role in the ouster of Ms. Rousseff, who was chairwoman of Petrobras when the kickback arrangement was hatched, though she has not been accused of any wrongdoing. In her impeachment trial, she is accused of a budgetary sleight of hand in an effort to conceal Brazil’s economic troubles and win re-election in 2014 — not of stealing to enrich herself.
The need to form alliances of convenience in Congress can lead to legislative chaos, especially when disgruntled partners bolt from the president’s coalition. Ms. Rousseff, who once enjoyed a wide majority in the lower house, was ultimately knocked aside by the house’s now deposed speaker, Eduardo Cunha, a onetime ally who faces a graft trial.
Mr. Cunha’s party, the Brazilian Democratic Movement Party, called the P.M.D.B., has become a particular source of outrage in Brazil. Critics say the party, founded five decades ago as an opposition party but tolerated by the nation’s military dictatorship, has become a vast patronage trough for its members, who embrace a wide spectrum of ideologies.
The party’s ace is its size, which means that presidents have to enter into a partnership that involves doling out coveted cabinet posts. Ms. Rousseff chose Michel Temer of the P.M.D.B. to be her vice president. This year, he turned against her and withdrew his party from her coalition, paving the way for Ms. Rousseff’s impeachment trial. Mr. Temer, who has been convicted of violating campaign finance limits, is now the nation’s president.
Political reform can be challenging, given that legislators must approve undoing the system that protects them. There have been some changes, including a recent law that bars candidates with criminal records from running for office for eight years, and a campaign finance law, scheduled to take effect this year, that limits the influence of corporate money.
The crush of Brazilian parties tends to favor celebrity candidates, whose name recognition helps vault them to the top of the ballot heap during elections. The most curious example is Tiririca the Clown, whose stage name translates as Grumpy.
In 2010, he ran for the lower house on a lark with the slogan “It can’t get any worse,” and his campaign literature included this tagline: “What does a congressman do? The truth is I don’t know, but vote for me and I’ll tell you.”
He prevailed with more than 1.3 million votes — nearly twice as many as the next candidate.
In an interview, Tiririca — whose real name is Francisco Everardo Oliveira Silva, though Deputy Tiririca is the name on the house website — said he was often disappointed by the disarray in Congress.
“At first it was a joke,” he said of his candidacy. “So I decided that if so many people believe in me, I would have to give it my best, and that’s what I’m doing.”