Magna International Inc. will acquire Veoneer Inc. for $3.8 billion in cash, bolstering its business supplying advanced driver-assistance systems to automakers.

The $31.25-a-share offer represents a 57% premium to Veoneer’s closing price on Thursday. The transaction is expected to close toward the end of this year, according to a statement.

Veoneer was spun off by leading auto-safety supplier Autoliv Inc. in 2018. The shares lost more than half their value after the split as orders slumped and the company racked up losses. Automakers and their large suppliers have struggled to commercialize autonomous-driving technology due to high costs and engineering challenges.

“This is a very good outcome for VNE shareholders,” Joseph Spak, an analyst at RBC Capital Markets, said in a note. The deal gives Veoneer more resources to develop its suite of driver-assistance systems and it now has a big customer for its vehicle perception and software platform, Spak wrote.

Magna and Veoneer said the deal has been unanimously approved by their respective boards. Citigroup Inc. served as financial adviser and Sidley Austin LLP provided legal counsel to Magna. Rothschild & Co. and Morgan Stanley advised Veoneer along with Skadden, Arps, Slate, Meagher & Flom LLP.