Brazil’s CADE said it has approved the sale of JBS assets in Argentina, Paraguay and Uruguay to Minerva Foods, a $300m transaction the pair agreed in June.

Despite regulatory approval, the deal requires the green light from Brazil’s courts, after the 10th Federal Court of Brasilia blocked the sale in late June.

The ruling, issued by Judge Ricardo Leita, was deemed “premature,” due to weak evidence presented by JBS executives in their plea agreement, according to media reports.

JBS said it would “take necessary legal measures” to appeal the decision. The company agreed to sell its Latin American businesses outside of Brazil to Minerva subsidiaries for $300m.

Pul Argentina was to take over JBS’ beef operations in Argentina, while Frigomerc would have acquired Industria Paraguaya Frigorifica (IPF) in Paraguay and Pulsa was expected to operate Frigorificao Canelones in Uruguay, Minerva said in a statement at the time.

JBS has been under pressure to sell assets since it signed a plea agreement with federal prosecutors as part of a sweeping corruption investigation.