On Friday, Tesla struck a deal with mining companies Bacanora Minerals Ltd and Rare Earth Minerals Plc. to purchase lithium compounds from a proposed mining site in northern Mexico.

The mine is not functional yet—the deal requires the mining companies to raise funding to construct a mine as well as processing facilities over the next two years. But as the supply contract published by Bacanora (PDF) states, the companies project that once the mine is up and running, it will be able to supply 35,000 tons of lithium compounds (namely, lithium hydroxide and lithium carbonate) per year at first, eventually expanding to 50,000 tons per year.

Tesla has agreed to purchase a minimum amount of lithium hydroxide from Bacanora Minerals and Rare Earth Minerals for five years after the mine becomes operational, with the potential to extend the agreement. In exchange, the mining companies will sell their mined materials to Tesla at below market rate, the Wall Street Journal reports.

Bacanora’s supply contract states that the two mining companies, who together call themselves the Sonora Lithium Project Partners, will have to secure “significant” financing, but Tesla is permitted to contribute to the companies’ funding. Fortune notes that the mining companies originally estimated that they needed $114 million to build a lithium mine on the site, but a reassessment will have to be done with the new demands from Tesla in mind.

The Lithium hydroxide mined from the Sonora Lithium Project will be transported up to Tesla’s $5 billion Gigafactory being built outside of Reno, Nevada in partnership with Panasonic. According to the Wall Street Journal, the first phase of the Gigafactory is supposed to be complete next year. Tesla hopes to produce 35 gigawatt-hours of battery cells for cars and homes at the factory’s full capacity.