Canadian firm First Quantum Minerals said Friday it was laying off more than 4,000 workers after a court prohibited it from operating the largest open-air copper mine in Central America.

The company's Panamanian subsidiary said in a press release it was "forced to request" from the Labor Ministry "authorization to terminate the contracts of more than 4,000 employees for justified economic reasons."

The company, which had already announced a week ago that it intended to freeze 7,000 employment contracts, said that certain jobs will be maintained in order to guarantee "the safety of the installations and to avoid losses or environmental damage within the mining area."

In addition to some 7,000 direct jobs, the operation of the mine would have generated some 33,000 indirect jobs.

The Panamanian legislature's approval in October of the renewal -- up to 40 years -- of the concession contract for the gigantic mining operation sparked major demonstrations and roadblocks by environmental and other groups.

The Supreme Court ultimately declared the law governing the contract "unconstitutional." Panamanian President Laurentino Cortizo, who was criticized for "inaction" in the face of the blockages, subsequently promised an "orderly and safe" closure for the mine.

Located 240 kilometers (150 miles) from the capital, the open-cast mine has produced some 300,000 tonnes of copper concentrate per year since 2019, representing 75 percent of Panama's exports and five percent of its GDP.

First Quantum Minerals said the new contract provided for annual contributions to the state of at least $375 million, ten times more than the previous agreement dating from 1997.

FQM has initiated proceedings before the International Court of Arbitration "to enforce its rights" under the 2023 agreement signed with the Panamanian government.

The International Court of Arbitration is an autonomous body of the International Chamber of Commerce, headquartered in Paris. If the Central American country loses the arbitration, it could have to pay millions of dollars in compensation.