Tesla has decided to become a technical partner in a nickel mine - which is needed for lithium-ion batteries that power electric cars.
Elon Musk's car firm will also buy nickel from the Goro mine on the small Pacific island of New Caledonia to secure its long-term supply.
The move comes amid growing concerns about future supplies of nickel.
New Caledonia is the world's fourth largest nickel producer, which has seen a 26% rally in prices in the past year.
"Nickel is our biggest concern for scaling lithium-ion cell production," Musk said on Twitter last month.
New Caledonia is a French overseas territory although it has seen growing calls for its independence.
What is the Goro mine?
New Caledonia's huge nickel reserves are crucial for the local economy, and the Goro mine, in the south of the island, has the potential to be one of the world's biggest nickel producers.
In December, its owners Brazilian mining giant Vale and the French state, tried to sell it to Swiss commodities trader Trafigura.
Residents were so angry about the loss of local ownership and control that it sparked the collapse of New Caledonia's government and led to workers going on strike.
A new agreement hammered out on Thursday by pro-independence groups, loyalist parties and indigenous Kanaks will see the mine sold to a consortium that now includes employees as well as three regional provinces. Trafigura will hold just 19%.
Tesla will be involved in a "technical and industrial partnership" to help with product and sustainability standards along with taking nickel for its battery production, according to the agreement.
It will play the role of technical consultant in the design and improvement of the manufacturing process.
Vale said the deal would "enable the operations to continue with a sustainable path for the future, preserving jobs and delivering economic value to the country".
While Tesla will not have an equity stake, its partnership in the mine gives it greater control over its electric battery supply chain as it ramps up production.
Nickel is mined mostly in Russia, Canada, New Caledonia and Indonesia and primarily used to make stainless steel. But the growth in electric vehicles has added a new source of demand for the metal.
The extraction of nickel, particularly the use of coal-fired power, comes at an environmental and health cost and mines have been criticised repeatedly by campaigners
Thursday's agreement called for reinforced environmental standards and set a target for the mining complex to be carbon neutral by 2040.