Chilean copper mining giant Codelco has signed an agreement with union leaders to end a national strike over the decision to shutter the troubled Ventanas copper smelter.

The deal was reached after the government agreed to reinvest 30% of the state-owned firm’s profits from 2021-2024 back into its projects, with an aim to reduce borrowing requirements.

Chilean Finance Minister Mario Marcel announced a $583m reinvestment plan for the miner this year.

Last week, Codelco’s board of directors approved the closure of the copper smelter following the suspension of operations to undertake maintenance as reports emerged that dozens of people had fallen ill in the region.

The decision to close the facility, which was subsequently supported by Chilean President Gabriel Boric, was attributed to outdated technology that made emissions reduction difficult, reported Reuters.

Following the decision to close the facility, a strike was initiated by the Federation of Copper Workers (FTC), an umbrella group of Codelco’s unions, urging the firm to approve investments to upgrade the smelter.

Employing 350 people, the facility received an investment of nearly $156m to reduce emissions over a decade. It also operates a copper refinery, which remains unaffected by the company’s decision.

The firm has now agreed to strengthen the Ventanas copper refinery but did not commit to additional investment in the smelter.

Codelco said in a press statement: “The administration and the union leaders agreed to establish as a principle of dialogue the care of the health of the workers, of the communities where the operations are inserted, the protection of the environment, as well as the protection of employability, together with the empowerment of Codelco as a public company.”