Both Mercedes-Benz and Volkswagen have reached agreements with Canada to secure access to important raw materials for battery production, including nickel, cobalt, and lithium.

Memorandums of understanding are being signed this week with Canada Prime Minister Justin Trudeau and German Chancellor Olaf Scholz.

The agreement that VW has secured is aimed to shorten supply chains for its facilities in the U.S. and to help it avoid difficulties related to tariffs and tax regulations. An individual with knowledge of the agreement said it has been partly prompted by the U.S. Inflation Reduction Act being signed into law by President Joe Biden last week.

Bloomberg notes that VW’s battery business, PowerCo, is also working to ramp up its battery activities to ensure “reliable and sustainable supply chains.”

Read More: Canada Is Pitching Itself To Automakers As The Perfect Place To Build EVs

“I’m very happy that among the many, many declarations which are being signed during our visit, there are also those planned by Volkswagen and Mercedes, for example, in which a closer cooperation in this area will be sealed,” German Chancellor Olaf Scholz said of the agreements.

Volkswagen has plans in place to establish six battery plants across Europe and is considering setting up an in-house battery cell manufacturing operation in North America. While the VW board has yet to make a final decision on this plan, Volkswagen of America chief operating officer Johan De Nysschen said the facility could ease a coming battery shortage by supplementing suppliers with its own production.

Outgoing VW chief executive Herbert Diess is traveling with Scholz on his Canada trip. Germany’s Economy Minister Robert Habeck has joined them.

Scholz recently told Bloomberg that the agreement with Canada will help reduce its reliance on Russia for energy and raw materials, noting that Canada “has similar rich natural resources as Russia – with the difference that it is a reliable democracy.”