General Motors is preparing to reduce its dependency on imports of raw materials from China by shifting its supply to domestic sources. The company announced Thursday that it is working with domestic suppliers to secure key materials and components for its vehicles over the coming decade.

GM said it had made more than a dozen deals with local manufacturers to supply it with the necessary components for its electric vehicles. One of the deals is a contract for rare earth metals from the only remaining commercial mine in the U.S.

The company said it had reached an agreement with MP Materials, a California-based company that owns the only commercial rare earth mine in the country. Under the deal, MP Materials has agreed to supply raw and processed rare earth metals to GM. The company said it plans to set up a new factory in Forth Worth, Texas, to meet GM's expected demand.

GM said it has also signed made a deal with two companies, which will be supplying it with high-powered magnets for its electric vehicle motors. GM and most other U.S. carmakers currently source magnets and other raw materials from China.

GM's vice president of global product development, purchasing, and supply chain, Shilpan Amin, said the company plans to establish a "North American-focused" supply chain for its future EV production.

Analysts said GM has gradually been laying out plans to source raw materials and other components from suppliers in the U.S. and Canada. Stephanie Brinley of IHS Markit said buying domestically would reduce the company's dependence on potentially unreliable sources, like China. Brinley added that it would also help minimize the risk of supply chain disruptions should tensions between the U.S. and China escalate further.

This year, U.S. automotive manufacturing has been crippled by a shortage of foreign-made semiconductors, resulting in empty dealer lots and billions of dollars in lost industry revenue. Apart from trade tensions, supply has also been hampered by the COVID-19 pandemic and underlying global logistical problems.

The car industry as a whole has also been rapidly moving away from internal combustion engines and toward battery technologies. GM has one of the most aggressive transition programs in the business.

This year, GM CEO Mary Barra increased the company's anticipated expenditure on electric and driverless vehicles to $35 billion, up from $20 billion last year. By 2025, it expects to have at least 30 fully battery-electric vehicles on the market. By 2035, it intends to completely phase out gasoline and diesel automobiles.