Samsung Electronics (SSNLF) has agreed to buy Harman International Industries (HAR) for $8 billion in a move that will boost its competitiveness in the fast-growing automotive electronics technology, the two companies announced on Monday.

The Suwon, South Korea-based conglomerate will pay $112 per share in cash for Harman, whose offerings including car systems, auto and visual products and other connected products. Harman's shares closed at $87.65 on Friday.  

The move comes as Samsung continues to stand on shaky ground since fire incidents on batteries have forced the world's largest smartphone maker to withdraw its flagship Galaxy Note 7, leaving room for Action Alerts PLUS holding Apple (AAPL) - Get Report and other rivals to fill the void. Samsung has also had to recall 2.8 million washing machines in the U.S. following reports the machine tops can detach during use.

"Samsung just did what I begged Apple to do: buy Harman. This is a brilliant move for Samsung as Harman knows the connected car best," said TheStreet's Jim Cramer. "For $8 billion in cash Samsung now can own the infotainment and cybersecurity of the car!"

In mid-October, Samsung warned investors that the discontinuation of Galaxy Note 7 will lead to a mid-3 trillion won ($2.6 billion) negative impact on its operating profit in the fourth quarter of 2016 and the first quarter of 2017. Samsung reported net income of 19.06 trillion won on sales of 200.65 trillion won in 2015.

The announcement by the South Korean maker also comes at a time when momentum heats up for the automotive electronics market, a trend which has led to other acquisitions as players fight for speed. Samsung estimates the automotive electronics marker to expand to more than $100 billion by 2025.

Last month, Qualcomm (QCOM) - Get Report agreed to buy the world's largest automotive semiconductor maker (and Action Alerts PLUS holding) NXP Semiconductors (NXPI) - Get Report for $47 billion.

Harman reported $7.0 billion in sales in the year ended September 30. Of this, about 65% was automotive-related. The company has order backlog of about $24 billion for such products in the current year, according to the release.

Samsung said it values both Harman's technology for in-vehicle technologies as well as its long-term relationships with the world's leading automakers, and that it hopes to integrate it with its own expertise in connected devices and semiconductors.

"As a Tier 1 automotive supplier with deep customer relationships, strong brands, leading technology and a recognized portfolio of best-in-class products, HARMAN immediately establishes a strong foundation for Samsung to grow our automotive platform," said Samsung CEO Oh-Hyun Kwon.