Americans may have missed the news in Panama. The events there in the last part of 2023 may have long-lasting implications for renewable energy.

Those events are a microcosm of a much bigger test. The global community must limit temperature increases, which requires many more raw materials to build such things as windmills, solar panels and electric car batteries.

A battle between a Canadian copper mining company and environmentalists and indigenous natives has been brewing in Panama — the quintessential jobs-versus-climate-change clash. Panamanians said that expanding the mine would disrupt its rainforests and the livelihoods of those who survive there. In contrast, the mining company said it would cost Panama 40,000 jobs and reserves the right to appeal to an international arbitration court.

The bottom line is that the country’s supreme court ruled in favor of the environmentalists and indigenous communities, forcing First Quantum Minerals to cease operations. Panama’s president, Laurentino Cortizo, said he would respect the court’s decision and close the mine.

“Between the human right to a healthy environment and the right to protection of economic investment, the balance of the Supreme Court will naturally tilt toward safeguarding the continuity of human beings,” the ruling said.

The question is how to reconcile the desire for more renewables with the need for rare earths. However, the Panamanian dispute entails much more — its coveted rainforests, biodiversity and the nation’s sovereign rights.

But does it conflict with the conclusions of the 28th Conference of the Parties to the U.N. Framework Convention on Climate Change (COP28) to phase down fossil-energy usage by tripling renewables, doubling energy efficiency measures, and stopping deforestation by 2030? That includes reaching 33,000 gigawatts of renewable energy and electrifying 90 percent of the transportation industry by 2050.

The bad news is that the rare minerals are concentrated in a few countries, putting the rest of the world at risk from political unrest to export restrictions to market manipulation. Moreover, the United States and the European Union defer mining and labor to developing countries while they create the products.

The International Renewable Energy Agency released the Geopolitics of the Energy Transition, which concludes that the supply of rare earths does not impede net zero goals. However, it said mining techniques must be environmentally benign while the host countries must realize greater economic benefits.

Its premise is that a well-planned energy transition can rehabilitate the extractive industry. If corporations respect local communities, it gives them a broader social license. A critical step is to provide the host country with a more significant stake in the end value, allowing them to create more jobs.

“Currently, richer countries are benefiting from lithium batteries in phones and electric cars, while poorer countries bear the brunt of the damage caused by mining,” said Tahmid Chowdhury with the Cambridge Institute for Sustainability Leadership.

Circling back to Panama, First Quantum already paid $567 million — the first installment of what would have been $375 million annually. At the same time, the mining company said it has established a goal of 30 percent reduction in greenhouse gases by 2025 and 50 percent by 2030 at the project while it continues to reforest.

Juan Monterrey, executive director of Geoversity, said the proceeds pale compared to what the mining company would reap. Moreover, he said the contract was negotiated in secrecy and violated the country’s rainforests and sovereignty.

“The contract cannot be re-negotiated, and international bidding cannot happen” because the mining moratorium and social unrest prohibit the “approval of any new concession application,” Monterrey said. “Therefore, closure and restoration of the site is the only legal path forward.”

The global implications? Developing countries must leverage their negotiating strength and extract — no pun intended — critical concessions from foreign investors. Among other things, it includes sharing more of the wealth while repairing the footprints they leave behind.