China has approved the sale of Toshiba's prized chip unit to a group of investors led by the private equity firm Bain Capital.

The $18 billion deal had been in regulatory limbo as investors waited for a green light from China, the last country that needed to sign off. Trade tensions between the United States and China had raised the prospect that China might hold up the sale indefinitely.

Bain Capital, in a statement, said it would make "significant capital investments" in the semiconductor business to keep it competitive.

Other investors include Apple (AAPL), Dell Technologies and South Korean semiconductor company SK Hynix. When the deal was announced in September 2017, SK Hynix said that Toshiba would maintain a minority stake.

Washington and Beijing have threatened to impose tariffs on tens of billions of dollars of each other's products, fueling fears of a full-blown trade war. Analysts had questioned whether China was withholding approval of the Toshiba-Bain deal to use it as a bargaining chip.

Qualcomm has also been waiting for Chinese regulators to authorize its purchase of NXP Semiconductors, a Dutch company. There's still no sign of movement on that deal, although China's approval of the Toshiba sale could be a positive sign.

Related: Executives sound off on Trump's proposed China tariffs

China has the authority to weigh in on deals involving multinational companies when the parties involved make a significant amount of revenue in the country.

In recent months, semiconductors have become the epicenter of a growing fight for technological dominance between China and the United States.

President Trump raised the stakes in March when he intervened to block Broadcom's $117 billion bid for Qualcomm, citing national security concerns.

The deal, which would have combined two computer chip makers, had been under investigation by the Committee on Foreign Investment in the United States, or CFIUS. The committee examines deals for national security risks when they would give foreign investors control of American businesses.

CFIUS said one big concern with the Broadcom deal was that it could cause the United States to fall behind on the development of 5G technology, allowing China to take the lead.

The sale provides cash for Toshiba, which has struggled in recent years. The Japanese conglomerate, a one-time powerhouse, made a failed bet on the US nuclear industry that gutted its finances. Toshiba sold its beleaguered Westinghouse unit earlier this year.