Nvidia is buying British chipmaker ARM from SoftBank for as much as $40 billion — a total that would make it the largest semiconductor deal ever. The agreement, announced Sunday, will be financed through a mix of cash and stock, the companies said in a joint statement. The move would allow Nvidia\n \n (NVDA) — which mainly makes graphics processors for computer games and self-driving cars — to become an industry leader across more connected devices, including smartphones, PCs, robotics and 5G, CEO Jensen Huang wrote in a letter to employees Sunday. ARM designs chips used by Apple\n \n (AAPL) and other major smartphone makers. The firm is based in Cambridge and is known as one of Britain’s most successful tech companies. Nvidia said Sunday that it plans to keep Arm’s headquarters in Cambridge, as well as expand its campus with a new research facility. “ARM’s business model is brilliant. We will maintain its open-licensing model and customer neutrality, serving customers in any industry, across the world, and further expand ARM’s [intellectual property] licensing portfolio,” Huang wrote. The deal is likely to come under significant scrutiny in the United Kingdom, where some politicians are concerned about preserving jobs at ARM. Nvidia’s rivals — which purchase chip designs from ARM — are also likely to object. The prime minister’s official spokesperson said Monday that the UK government will not hesitate to investigate any takeover that could have a major impact on the country. Another asset sale for SoftBank The deal comes four years after SoftBank bought ARM for $32 billion, marking the largest foreign takeover by a Japanese firm at the time. SoftBank has been working to divest assets in recent months as the conglomerate looks to raise cash in response to the coronavirus pandemic. In March, it announced a plan to sell $41 billion worth of assets, and last month it doubled down with a partial sale of its stake in its Japanese mobile carrier affiliate. SoftBank shares in Tokyo were up nearly 9% Monday following the news. The Financial Times also reported Monday that SoftBank is reconsidering a plan to privatize the company. SoftBank declined to comment on the report. “The combination is likely to lift SoftBank’s share price in Tokyo,” wrote Jeffrey Halley, senior market analyst for Asia Pacific at Oanda, in a note to clients. If the ARM deal goes through, it will be the semiconductor industry’s biggest-ever deal, topping Avago’s acquisition of Broadcom in 2015, according to Dealogic. Under the agreement, Nvidia will pay about $12 billion in cash and $21.5 billion in stock. SoftBank will receive a stake of less than 10% in Nvidia, and the Japanese company will also be eligible for a payout of up to $5 billion if ARM meets “specific financial performance targets,” according to SoftBank. The company did not disclose the targets. The deal is expected to close within 18 months. It will first have to pass regulatory approvals from the United Kingdom, the European Union, the United States and China. — Luke McGee and Charles Riley contributed to this report.