Qualcomm Inc. has partnered with a newly formed private equity firm on an agreement to acquire Veoneer Inc., ending a lengthy battle between the chipmaker and an incumbent car supplier for control of an automotive-technology company.

Under the deal, Qualcomm and New York-based SSW Partners will acquire Veoneer for $37 a share, an 18% premium over a bid Magna International Inc. made in July. SSW Partners, founded by former Lazard dealmaker Antonio Weiss, will then sell Veoneer’s autonomous-driving software operation known as Arriver to Qualcomm, and find owners for the rest of its businesses.

Qualcomm’s Cristiano Amon was keen to keep Arriver from falling into Magna’s hands. The chief executive officer is eager to carve out a bigger role for Qualcomm outside the smartphone market that generates most of the company’s revenue. Arriver was born out of a collaboration Qualcomm and Veoneer first communicated more than a year ago and crystallized in January.

While Amon no longer has to worry about Magna — the car-parts giant waived a chance to counter and will walk away with a $110 million termination fee — Qualcomm has had problems in the past getting acquisitions approved. Chinese antitrust clearance scuttled its $44 billion bid to acquire rival chipmaker NXP Semiconductors NV three years ago in what would have been the largest-ever deal in the semiconductor industry.

Magna first started pursuing Veoneer in September 2019, according to a proxy statement released last month before the Canadian company terminated its merger agreement.

Dan Levy, an auto analyst at Credit Suisse, said in a note that he sees potential for Magna to acquire Veoneer’s non-Arriver assets, which include electronics and sensors that set off airbags and seatbelt pretensioners.

“Magna’s waiver decision underscores our disciplined approach to valuation as we pursue strategic acquisitions and continue to act in the best interests of our shareholders,” CEO Swamy Kotagiri said in a statement.

Acquiring the Arriver business within Veoneer should give Qualcomm a firmer footing in the emerging market for driver-assistance technology. The San Diego-based company is already offering chips that run the information and entertainment features of vehicles and others that connected them to phone networks.

Qualcomm is increasing its capabilities to better take on rivals in the race to provide the heart of technology expected to eventually enable self-driving vehicles. Automakers are turning to chipmakers to assemble the various pieces of hardware and software that will power such systems. Intel Corp. and Nvidia Corp. have automotive chip divisions that offer customers more than just basic components.

Veoneer and Qualcomm said their boards have signed off on the transaction and that they expect it to close next year.

Amon was promoted to the company’s top job in June and has said his tenure will be defined by his success in lessening its reliance on the smartphone market that its processors and modem dominate. Automotive products accounted for about 3% of chip sales last year and has been growing slowly in recent quarters.

Prior to the deal, Qualcomm and Veoneer had said they planned to develop driver-assistance and autonomous systems that integrate Veoneer’s perception technology and software stack with Qualcomm chips. The companies said in January they had presented their systems to automakers and top-tier suppliers and got positive feedback, though they haven’t announced any customers.

The Veoneer deal follows Qualcomm’s acquisition earlier this year of Nuvia Inc., which the company bought for $1.4 billion to produce chips that will bolster its efforts to get into the PC market.