The company said on Monday that it was a victim of the bribery scheme and had already recovered 1.475 billion Brazilian reais, or about $449 million, in restitution. Petrobras said it would “continue to pursue all available legal remedies from culpable companies and individuals.”

“The agreement is in the company’s best interest and that of its shareholders, given the risks of a verdict advised by a jury, particularities of U.S. procedure and securities laws, as well its assessment of the status of the class action and the nature of such litigation in the United States,” Petrobras said in a filing with the Securities and Exchange Commission on Wednesday.

The company said that it would pay the settlement in three installments, but would recognize the total settlement as part of its fourth-quarter 2017 results. It said that the settlement did not constitute an admission of wrongdoing or misconduct and that it “expressly denies liability” in the agreement.

The deal would resolve all pending and prospective claims by purchasers of Petrobras securities in the United States and by purchasers of Petrobras securities that are listed for trading in the United States, the company said. The settlement still has to be approved by the United States District Court for the Southern District of New York.

In a statement, the lead counsel for the plaintiffs in the class-action lawsuit said it was “very pleased with this historic settlement.”