Image copyright AFP/Getty Image caption Petrobras CEO Pedro Parente says the firm was the victim of the kickback scheme

The Brazilian state oil company, Petrobras, has agreed to pay almost $3bn (£2.18bn) to settle a class action suit in the United States.

The case was brought by investors who said their holdings were damaged by a corruption scandal facing the firm.

Former Petrobras executives are accused of accepting bribes from contractors.

Lawyers acting for the oil giant said the payout was not an admission of guilt and that the company was itself a victim of the scheme.

Petrobras saw its value plunge amid a wide-ranging inquiry into bribes offered to politicians and executives at state-run companies in exchange for business deals.

The inquiry has led to the arrest of dozens of politicians and executives during years of investigation in Brazil and elsewhere.

Former Petrobras chief executives Maria das Gracas Foster and Jose Sergio Gabrielli are among eight tied to the oil company accused by Brazilian authorities.

The deal announced on Wednesday ranks among the largest in US history in cases claiming securities fraud but is smaller than some analysts expected.

Under the proposed settlement, Petrobras has agreed to pay $2.95bn, to be distributed in several instalments.

The company said the deal, which will be reviewed by the judge overseeing the case, makes sense for shareholders.

Petrobras said: "It eliminates the risk of an adverse judgment which, as Petrobras has previously reported, could have a material adverse effect on the company and its financial situation, and puts an end to the uncertainties, burdens and costs of protracted litigation."

Petrobras has said it was a victim of the kickback scheme, which chief executive Pedro Parente has estimated cost the firm $1.8bn.

Brazilian authorities have also returned more than $400m to the company recovered from people co-operating with the investigation.