DOUGLAS MAGNO via Getty Images Fans of the Chapecoense soccer club gathered to mourn the Monday plane crash that killed 71 people.

The lead prosecutor of a high-profile corruption case in Brazil is accusing the government of using the tragedy of a recent plane crash to sneakily pass a law that will protect dirty officials.

On Tuesday, after a chartered flight carrying the Brazilian soccer club Chapecoense crashed in Colombia and killed 71 people on board, Brazil President Michel Temer declared a three-day period of national mourning.

Hours later, the lower house of the Brazilian Congress overwhelmingly voted to gut an anti-corruption bill in a way that public prosecutors and political observers say could ensure lawmakers don’t come under scrutiny.

The original version of the proposed 10 Measures law sought to root out political corruption amid Brazil’s ongoing Operation Car Wash money laundering investigation, which could ultimately implicate dozens of lawmakers for taking improper bribes from the state-owned oil giant Petrobras. The scandal, along with the September impeachment of former President Dilma Rousseff, has thrown the country into political crisis.

But late on Tuesday night, Congress instead approved a version of the bill that included provisions allowing defendants to sue prosecutors and judges for overstepping their powers.

The new version, which passed 450-1, also increases potential prison sentences for prosecutors and judges, a move prosecutors interpreted as an effort to put an end to Car Wash investigations and threaten the independence of the government’s judicial branch.

Deltan Dallagnol, one of the lead prosecutors in the Car Wash investigation, criticized the legislation in a Facebook post on Wednesday, saying that it “undermines the independence of the prosecution and the judiciary.”

That legislation to water down Car Wash will not make progress. It is dead politically. The judicial branch and the prosecutors have mobilized, and society is mobilized. Paulo Sotero, Woodrow Wilson International Center

When the plane carrying top Brazilian soccer club Chapecoense to the final of the Copa Sudamericana crashed in the mountains of Medellin, Colombia, late Monday night, it killed all but five on board. The sudden loss led to nationwide sadness. The upstart club’s Cinderella run to the final of South America’s second-largest tournament had enraptured Brazilians.

“In the dead of night, [lawmakers] took advantage of a moment of national mourning and shock to subvert the proposals,” Dallagnol told The Guardian of the vote.

Paulo Sotero, the director of the Brazil Initiative at the Woodrow Wilson International Center in Washington, also saw the maneuver as a cynical attempt to take advantage of the crash.

“These people will use anything and everything to try to save themselves,” Sotero, speaking from Sao Paulo, said. “People here are very hurt, and people are shocked. [Lawmakers] are probably trying to use the fact that people are very emotionally exposed here to try to pass this.”

The process in the lower house repeated itself Wednesday in the Brazilian Senate, but with a different outcome: Senate leader Renan Calheiros attempted to push the bill through in a late night vote, only to see it blocked. The Brazilian Supreme Court on Thursday voted that Calheiros should face trial for embezzlement, which he denies.

The version of the bill approved in the lower house maintains some of the original anti-corruption measures. But it also removes rewards and protections for whistleblowers and amends the types of penalties lawmakers can face as a result of corruption, and the new, controversial elements undermine the original provisions, some observers said.

“The few points of the original proposal that remained are not enough to contain the major damage caused by inserting into the legislation intimidating measures against judges,” Marlon Reis, a judge and founder of the Movement to Combat Electoral Corruption, told HuffPost Brazil.

Temer, who is facing growing unpopularity, has previously hinted that he will veto the package of reforms if it shields lawmakers from corruption probes. Top Brazilian public prosecutors, including those in charge of the Car Wash investigations, have threatened to resign en masse if the protection measures become law.

“The prosecutors of the Car Wash Task Force hereby express rejection of any attempt to terrorize attorneys, prosecutors and judges in their legitimate exercise of the research activity, processing and prosecution of crimes, especially those committed in the highest spheres of power,” Dallagnol wrote in his Facebook post.

Rodrigo Maia, the president of Brazil’s Congress, countered those arguments, telling reporters Wednesday that the process of revising the 10 Measures bill and legislating a new version of it was “very transparent.”

Sotero, of the Wilson Center, said the lawmakers’ attempt to force through changes to the anti-corruption bill has only strengthened Brazilians’ resolve to carry through with the Car Wash investigation. He predicted that the efforts to amend the 10 Measures bill the way lawmakers hoped are finished.

“That legislation to water down Car Wash will not make progress. It is dead politically,” Sotero said. “The judicial branch and the prosecutors have mobilized, and society is mobilized.”

“The tolerance of impunity for people in high places is over,” he added.

In another controversial move, Brazil’s Senate on Tuesday approved a package of austerity measures aimed at reigning in federal spending.

The measures, a Temer priority, would cap federal spending levels for 20 years, a move that could pose threats to public health, education and other social programs. Ahead of the vote, the possibility of austerity sparked massive protests from students and other opponents of the proposed caps across the capital city of Brasilia.

The political turmoil has even begun to spill into Chapecoense’s weekend funeral ceremonies for the players who died.

Temer is reportedly planning to skip the services out of apparent fear that disenchanted crowds will boo him. The president instead reportedly asked families of players who died to meet him at the airport so he could share his condolences, angering the father of at least one player.

“No, I’m not going to the airport,” said Osmar Machado, the father of defender Filipe Machado, who died in the crash. “He has to come here. Do you think I’m going to leave my son here and go there to give him a hug, just because he is the president? What’s the importance of giving him a hug. It’s even a lack of respect for him to stay there.”

HuffPost Brazil’s Marcella Fernandes contributed reporting.

This story has been updated with comments from Paulo Sotero and Osmar Machado.