JAKARTA, Indonesia (AP) — Indonesia has finalized transfer of majority control over giant gold and copper mine from Freeport-McMoRan.

President Joko Widodo on Friday announced the landmark deal worth $3.85 billion to take over a 51.2 percent stake in PT Freeport Indonesia from the U.S. company has been completed by PT Inalum, a state-owned mining company.

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.

Freeport-McMoRan initially owns 90 percent of the Grasberg mine since it began operating in Indonesia’s easternmost Papua in 1973. The rest is owned by the Indonesian government.