By Anthony Boadle

BRASILIA (Reuters) - The judge presiding over a historic corruption investigation urged Brazil's Senate to oppose a bill that would undermine the authority of prosecutors and that critics say the lower house passed in a hasty bid to shield lawmakers from graft charges.

Judge Sergio Moro, amid growing tension between the judiciary and a scandal-plagued Congress, said the proposal sends the wrong signal to a nation eager to see tough action against widespread corruption.

Moro, who is presiding over a massive kickback investigation centered around state-run oil company Petrobras, spoke in a Senate debate one day after the lower house passed a bill that made it possible for judges and prosecutors to be punished for abuses of authority in cases involving legislators.

The judge said the bill was an attempt to intimidate them as they prepare, with the pending completion of an expected plea agreement with a major contractor involved in the Petrobras scandal, to implicate dozens of politicians. [nL1N1DV26Q]

"Maybe this is not the best moment to consider legislating on abuse of authority, given the important investigations underway," Moro said.

Like many critics of the bill, Moro said that lawmakers, by hurriedly approving the measure in a marathon late-night session, sought to prevent wider debate of a sensitive issue.

Lawmakers voted 450-1 early on Wednesday to approve the bill, which was originally supposed to be an anti-corruption measure. Instead, they gutted the bill by removing key elements, such as legal definition of the crime of illegal enrichment and the creation of a reward and protection system for informants.

The overwhelming support in the chamber accompanied mounting concern among many lawmakers over an impending plea bargain deal with Odebrecht SA [ODBES.UL], the country's largest engineering conglomerate. Company executives are expected to inform on bribes paid to as many as 200 politicians in recent years.

The president of the Senate, Renan Calheiros, who is facing several corruption investigations, tried to rush the bill through the upper house on Wednesday. But the motion, which would have fast-tracked the bill around Senate committee hearings, was defeated by 44 votes to 14.

Brazilians who backed the impeachment of former leftist President Dilma Rousseff earlier this year plan to rally in major cities on Sunday to protest Congress's perceived effort to obstruct the Petrobras investigation.

(Editing by Paulo Prada and Jonathan Oatis)