The board of Twitter has agreed to a $44bn (£34.5bn) takeover offer from the billionaire Elon Musk.
Mr Musk, who made the shock bid less than two weeks ago, said Twitter had “tremendous potential” that he would unlock.
He also called for a series of changes from relaxing its content restrictions to eradicating fake accounts.
The firm initially rebuffed Mr Musk’s bid, but it will now ask shareholders to vote to approve the deal.
Mr Musk is the world’s richest man, according to Forbes magazine, with an estimated net worth of $273.6bn mostly due to his shareholding in electric vehicle maker Tesla which he runs. He also leads the aerospace firm SpaceX.
“Free speech is the bedrock of a functioning democracy, and Twitter is the digital town square where matters vital to the future of humanity are debated,” Mr Musk said in a statement announcing the deal.
“I also want to make Twitter better than ever by enhancing the product with new features, making the algorithms open source to increase trust, defeating the spam bots, and authenticating all humans,” he added.
“Twitter has tremendous potential – I look forward to working with the company and the community of users to unlock it.”
The move by Mr Musk comes as Twitter has struggled to mediate the spread of misinformation on its platform. In one of its most high-profile moves, last year, it banned former US President Donald Trump, perhaps its most powerful user, citing the risk of “incitement of violence”.
While the takeover has been cheered by his followers, Mr Trump on Monday told Fox News he had no plans to re-join the platform and would instead stay on his own social network, Truth Social.
Bret Taylor, chair of Twitter’s board, said it had full assessed Mr Musk’s offer and it was “the best path forward for Twitter’s stockholders”.
It is not clear who will lead the new company. The firm company is currently led by Parag Agrawal, who took over from co-founder and former boss Jack Dorsey last November.
But in his offer document, Mr Musk told Twitter’s board: “I don’t have confidence in management.”
Under the deal, which is expected to close later this year, Twitter’s shares will be delisted and it will be taken private.
Mr Musk has suggested this will give him freedom to make the changes he wants to the business.
Mr Musk’s targeting of Twitter has moved at remarkable speed. It emerged at the beginning of April that Mr Musk had become the largest shareholder in the firm with a 9.2% stake.
He was then invited to join Twitter’s board but turned down the offer before launching a surprise bid for the company on 14 April, saying he wanted to “unlock” its potential as a bastion of freedom of speech.
Twitter responded by putting in place a so-called “poison pill” defence to fend off Mr Musk. The mechanism would have created difficulties for Mr Musk if he attempted to increase his stake in the company.
But Twitter’s stance shifted after Mr Musk revealed more financial details. He has secured $25.5bn of financing for the deal and will take a $21bn stake in the business.
Though it has transformed the news business and how celebrities and politicians reach their audiences, Twitter has long disappointed Wall Street, lagging other social media companies in its ability to convert that power into dollars.
The company ended 2021 with more than 200 million daily users globally, up 13% from the prior year, with most of that growth coming from overseas.
But earlier this year, shares were trading lower than they did when the company first listed on the stock exchange in 2013.