Brazil's top prosecutor has accused President Michel Temer of corruption and obstruction of justice, according to an investigation released by the country's supreme court.

Attorney General Rodrigo Janot wrote that Temer and a senior senator attempted to derail a sprawling anti-graft probe known as "Car Wash" by legislative means and influencing police investigators, the court filings made public on Friday said.

"In this way, there is evidence of possibly committing the crime of obstructing justice," Janot said.

The formal accusation is the latest revelation related to a secretly recorded audio, which purportedly captured Temer endorsing the paying of hush money to a former politician jailed on corruption charges.

The court also released plea-bargain testimony by the same man who recorded Temer - Joesley Batista, chairman of meat-packing giant JBS - which accused the president and his two predecessors of taking millions of dollars in bribes.

Batista said the company paid Temer 15m reais ($4.6m) in bribes.

Temer's office denied in a statement that he obstructed justice by interfering in the probe and also denied accusations that he took bribes.

The scandal has sparked protests and prompted eight impeachment filings, raising serious doubts whether Temer, 76, can remain as president.

Temer on Thursday said he would not resign, adding that he wanted the investigation to proceed as fast as possible.

"I have nothing to hide," he told an audience in the capital, Brasilia.

Temer took office in September, promising a "new era" for Brazil following the impeachment of ex-President Dilma Rousseff over accusations of taking illegal state loans to patch budget holes in 2014.

Millions in bribes

Prosecutors wrote they had proof that Aecio Neves, a senator accused of corruption, collaborated with Temer in attempts to slow or halt the Car Wash probe, which centres on political kickbacks in exchange for firms winning contracts at state-run enterprises, especially at oil company Petrobras.

According to the testimony, JBS had paid Neves to support a new "abuse of authority" law that seeks to make it easier for suspects and defendants to sue investigators, prosecutors and judges.

The measure, which passed the Senate last month, must still be approved by the lower house.

It has been sharply criticised by those leading Brazil's crackdown on corruption.

READ MORE: Brazil's beleaguered President Temer refuses to resign

The testimony also alleges that former President Luiz Inacio Lula da Silva, who is already facing five corruption trials, received $50m in bribes in offshore accounts. Rousseff, Temer's predecessor, was also accused of taking $30m in bribes, also in offshore accounts.

Lawyers for Lula said he was innocent. Rousseff also denied any wrongdoing in a statement.

During her impeachment trial, Rousseff said that her removal was the price she paid for refusing to quash the Car Wash probe, saying that corrupt politicians conspired to oust her to derail the investigations.

In addition to the three presidents, Congress members, ministers and several governors and mayors of major cities were named in the testimony. It implicates ruling and opposition parties alike.

"This is easily the worst moment in Brazil since we returned to democracy," Claudio Couto, a political scientist at the Getulio Vargas Foundation, calling the claims "the mother of all plea bargains".

"This testimony is hitting everyone, all the major political players and, most importantly, a sitting president," he told the Reuters news agency.

'Taking advantage'

The court also released the audio tape of Temer speaking with Batista.

In the recording, which was made in March, the president appeared to condone a payment to silence testimony by Eduardo Cunha, a potential witness in the Car Wash probe.

Cunha, a former lower house speaker who last year orchestrated Rousseff's impeachment, has been convicted of corruption and is serving a prison sentence.

Temer's office has questioned both the legality and content of the recording, which was first reported by the O Globo newspaper.

In a statement on Friday, Temer's office said the president "does not believe in the veracity of the declarations", and accused Batista, who is under investigation, of "taking advantage" of the situation.

Many politicians fear that if Cunha turned a witness for the state, his testimony could implicate scores of Congress and executive branch members.

Overall, the Car Wash probe has led to more than 90 convictions of businessmen and politicians and prompted the investigation of dozens of sitting Congress members and a third of Temer's cabinet.

OPINION: There is no justice for the poor in Brazil

The constant march of indictments and new scandals has led to widespread calls among Brazilians for new elections.

At least eight pieces of proposed legislation to impeach Temer have been submitted in Congress, and a steady stream of people from many walks of life have called for him to step down.

On Friday, former Chief Justice Joaquim Barbosa added his voice.

"There is not another way out: Brazilians must organise, go to the streets and demand with strength the immediate resignation of Michel Temer," tweeted Barbosa.