Softbank signed an agreement with South Korea’s Naver Corp, owner of messaging app Line, to merge it with Yahoo Japan.

Japan‘s SoftBank Corp plans to merge its internet unit Yahoo Japan with messaging app operator Line Corp to create a $30bn tech giant, as it bags struggling internet companies to bulk up against rivals like Rakuten Inc.

Softbank said in a statement that Yahoo Japan, which last month changed its name to Z Holdings Corp, will merge with Line, owned by South Korea‘s Naver Corp, in a deal to be completed in October 2020.

The companies aim for a definitive agreement by next month in a transaction that will see SoftBank Corp and Naver form an equally split joint venture partnership that will control Z Holdings, which will, in turn, operate Yahoo Japan and Line.

SoftBank Corp, which owns roughly 44 percent of Z Holidngs, and Naver, which owns 73 percent of loss-making Line, plan to launch a tender offer for Line’s remaining shares at a total of about 170 billion yen ($1.56bn) – a 13.4 percent premium to the shares’ price before news of the merger broke.

Line’s shares were up 2.6 percent at 5,180 yen ($46.50) in early Tokyo trade on Monday.

Line has been looking for growth through expansion into areas such as QR code payments with Line Pay, but has been squeezed because of its limited funds and heavy-spending peers including SoftBank, which has a rival service called PayPay.

Meanwhile, Yahoo Japan, which counts some 48 million daily active users across a portfolio of more than 100 mobile phone apps, has been struggling to keep its position as the country’s leading e-commerce player and web portal with the rise of rivals like Amazon and Rakuten Inc.

The merger deal is the latest example of consolidation in Japan’s technology industry. SoftBank this month completed its acquisition of online fashion retailer Zozo Inc, whose founder and ex-Chief Executive Yusaku Maezawa sold down his stake following a series of missteps.

Coming at a time of heightened political tension between Japan and South Korea, the merger might be the two countries’ most significant economic cooperation of the last 10 years, Jaewoong Lee, a South Korean serial entrepreneur and founder of Naver rival Daum wrote on his Facebook page late on Sunday.

Z Holdings will continue to be a consolidated subsidiary of SoftBank Corp, which is a unit of investment conglomerate SoftBank Group Corp.