JAKARTA, Indonesia — Indonesia is allowing Freeport-McMoRan to continue operating a giant gold and copper mine after the U.S. company agreed Tuesday to relinquish majority ownership of it.

Indonesian Energy and Minerals Minister Ignasius Jonan told a news conference that Phoenix, Arizona-based Freeport-McMoRan Copper & Gold Inc. could operate the mine in easternmost Papua until 2041 under a new arrangement with the government.

Details are still to be worked out, but it paves the way to end a lengthy dispute between Freeport and Indonesia that reduced the Grasberg mine’s production in recent months.

Freeport-McMoRan CEO Richard Adkerson told the news conference in Jakarta that Freeport had made a “major concession” to the Indonesian government.

The two sides have been on a collision course since a presidential regulation in 2012 imposed a limit of 49 percent on foreign ownership of companies issued new mining licenses. Foreign investors with ownership greater than 49 percent were required to sell shares to state-owned enterprises or privately owned Indonesian companies.

“Negotiation efforts have been made to the maximum,” Jonan said.

Freeport-McMoRan currently owns about 90 percent of the Grasberg mine and the rest is owned by the Indonesian government.

The mine in Papua, where a separatist movement simmers, has been the target of protests by Papuans who resent the region’s mineral wealth being exploited by the U.S. and Indonesia.

Apart from reduced ownership, Jonan said Freeport agreed to convert its original agreement signed with the government of former dictator Suharto in 1991 to a new mining license. The original agreement expires in 2021.

Freeport will also increase its investment in smelting in Indonesia, fulfilling a key demand of the government, which wants the country to get greater value from its mineral resources.

Adkerson said the original 1991 contract with the Indonesian government remains in force until all details are settled.