Aston Martin continues to struggle, so it’s reassuring the company has announced a “new strategic technology agreement and an enhanced partnership” with Mercedes.

While the companies have been working together for nearly a decade, the new agreement will give Aston Martin access to Mercedes’ next-generation hybrid and electric powertrains as well as other vehicle components and systems.

In exchange, Mercedes will be granted new shares in Aston Martin in several stages over the next three years. The shares are valued at up to £286 ($374 / €316) million and will see Mercedes significantly increase their stake in the British automaker. Mercedes currently holds a 2.6% stake in Aston Martin, but that will increase to “no more than 20.0%” under the deal.

Also Read: The Aston Martin DBX Is A Sexy Utility Vehicle With 542 HP

The companies didn’t go into many specifics, but confirmed “Aston Martin requested access to certain engines and powertrains as well as powertrain software, E/E architecture and various other components.” Mercedes agreed in exchange for stock which will be released to the company in stages as they give Aston Martin various “technology packages.”

The main terms and conditions for the first technology package have already been agreed upon and it is valued at £140 ($183 / €155) million. To pay for it, Aston Martin will increase Mercedes’ stake in the company from 2.6% to 11.8%.

Further technology packages are planned, but the companies noted they “need to agree upon the scope of the technology to be made available to Aston Martin, the respective value and the piece prices of components and systems.”

While it remains unclear what the first technology package involved, Aston Martin Executive Chairman Lawrence Stroll said “Today, we take another major step forward as our long-term partnership with Mercedes-Benz AG moves to another level with them becoming one of the company’s largest shareholders. Through this new expanded agreement, we secure access to world-class technologies to support our long-term product expansion plans, including electric and hybrid powertrains and this partnership underpins our confidence in the future.”