Five days ago, OpenAI’s board fired CEO Sam Altman. Now the pioneering artificial intelligence startup, which created buzzy AI chatbot ChatGPT, is bringing him back.

“We have reached an agreement in principle for Sam Altman to return to OpenAI as CEO with a new initial board of Bret Taylor (Chair), Larry Summers, and Adam D’Angelo,” the not-for-profit research company posted Friday night on X. “We are collaborating to figure out the details. Thank you so much for your patience through this.”

The new board comprises former Salesforce co-CEO Bret Taylor; Larry Summers, former Secretary of the Treasury and president of Harvard University; and Quora CEO Adam D’Angelo. D’Angelo was previously on OpenAI’s board; the three directors who evidently are no longer on the board are: OpenAI chief scientist Ilya Sutskever; tech entrepreneur Tasha McCauley (who is married to actor-filmmaker Joseph Gordon-Levitt); and Helen Toner, director of strategy and foundational research grants at Georgetown’s Center for Security and Emerging Technology.

The OpenAI CEO switcheroo comes after Microsoft chief Satya Nadella had announced on Nov. 19 that it had hired Altman, as well as OpenAI president Greg Brockman (who had quit after Altman was dismissed), to lead a new AI research team at the tech giant. Microsoft is a major investor in OpenAI. Meanwhile, OpenAI had recruited former Twitch chief Emmett Shear as interim CEO.

Altman’s deal to come back as OpenAI’s chief exec also comes after almost all of the organization’s employees signed on to a letter threatening to quit and join Microsoft unless its board resigned and reinstated Altman and Brockman.

Altman, in a post on X after OpenAI announced his return as CEO, wrote, “i love openai, and everything i’ve done over the past few days has been in service of keeping this team and its mission together. when i decided to join msft on sun evening, it was clear that was the best path for me and the team. with the new board and w satya’s support, i’m looking forward to returning to openai, and building on our strong partnership with msft.”

The previous board had not provided a detailed explanation for Altman’s ouster, saying that Altman “was not consistently candid in his communications with the board, hindering its ability to exercise its responsibilities,” according to its Nov. 17 statement. According to reports, Altman and the previous OpenAI board clashed over his desire to expand OpenAI’s for-profit commercial prospects, which the board members felt was at odds with the goal of ensuring AI safety. For example, OpenAI’s Sutskever, a co-founder of the startup, “was increasingly worried that OpenAI’s technology could be dangerous and that Mr. Altman was not paying enough attention to that risk,” according to a New York Times report. Over the weekend, Sutskever had a change of heart: In a post on X Monday morning, he wrote, “I deeply regret my participation in the board’s actions. I never intended to harm OpenAI. I love everything we’ve built together and I will do everything I can to reunite the company.” Sutskever also signed the letter demanding OpenAI’s board resign and bring back Altman as CEO.

Microsoft’s Nadella, for his part, wrote in a post late Friday on X, “We are encouraged by the changes to the OpenAI board. We believe this is a first essential step on a path to more stable, well-informed, and effective governance. Sam, Greg, and I have talked and agreed they have a key role to play along with the OAI leadership team in ensuring OAI continues to thrive and build on its mission. We look forward to building on our strong partnership and delivering the value of this next generation of AI to our customers and partners.”

And Shear commented, “I am deeply pleased by this result, after ~72 very intense hours of work. Coming into OpenAI, I wasn’t sure what the right path would be. This was the pathway that maximized safety alongside doing right by all stakeholders involved. I’m glad to have been a part of the solution.”

San Francisco-based OpenAI is a private research lab that develops AI, founded in 2015 as a nonprofit organization by Altman, Elon Musk (who is no longer affiliated with OpenAI and has launched his own artificial-intelligence startup, xAI) and others.

According to the vision statement on OpenAI’s website, “Our mission is to ensure that artificial general intelligence — AI systems that are generally smarter than humans — benefits all of humanity.” In addition to Microsoft, investors in OpenAI include Sequoia Capital and Thrive Capital.