Microsoft agreed to invest $1 billion in a partnership with research group OpenAI, gaining a prominent cloud-computing customer from the artificial-intelligence field.

OpenAI, co-founded by Elon Musk and other wealthy Silicon Valley entrepreneurs, will use Microsoft’s Azure cloud services to train and run the group’s AI software. The two will also jointly develop supercomputing technology, and Microsoft will be OpenAI’s preferred partner to commercialize its creations, the companies said.

OpenAI started in 2015 with much fanfare. Industry luminaries including Musk and Peter Thiel committed at least $1 billion to the nonprofit to build AI that could match or improve on the technology being developed by tech giants such as Google, Facebook and Microsoft.

However, Musk said he left OpenAI’s board last year over disagreements about some of the group’s plans. More recently, OpenAI started a for-profit arm to help it raise more money.

A partnership with Microsoft, which has more than $100 billion in cash, is a quick solution to OpenAI’s funding needs. But it is an about-face of sorts.

The group was seen by some in the AI community as an important counterbalance to large technology corporations that have snapped up talent and used their computing power and huge data hoards to leap ahead in the field.

Advocacy groups and policymakers have raised concerns and called for regulation to increase transparency, guard against bias and ensure AI isn’t used for military purposes and other dangerous applications. Those issues are likely to become more pressing in the future.

In February, OpenAI unveiled an algorithm that can write coherent sentences, including fake news articles, after being given just a small sample. The implications were so worrying that the group opted not to release the most powerful version of the software.

The partnership between Microsoft and OpenAI will focus on Artificial General Intelligence, which aims to get computers to learn new skills and complete varied tasks like humans can.

Microsoft is also looking for more Azure cloud customers and for ways to promote Azure’s AI capabilities, so a tie-up with OpenAI is lucrative.