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 person, 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.”
Mr Musk, who has more than 80 million followers on Twitter, has a controversial history on the platform himself.
In 2018 US financial regulators accused him of misleading Tesla investors with his tweets, claims that were resolved in a $40 million settlement and that Mr Musk continues to deny.
And in 2019 he was hit with a defamation suit – which he successfully defeated – after calling a diver involved in rescuing schoolboys in Thailand “pedo guy” on the platform.
On Monday, Mr Musk, who has been known to clash with journalists and block critics, suggested that he saw Twitter as a forum for debate.
“I hope that even my worst critics remain on Twitter, because that is what free speech means,” he wrote just hours before the deal was announced.
Can Musk turn Twitter around?
As part of the takeover, 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.
Among other ideas, he has suggested allowing longer posts and introducing the ability to edit them after they have been published.
Twitter shares on Monday closed more than 5% higher after the deal was announced.
But the price remained lower than Mr Musk’s $54.20 per share offer, a sign that Wall Street believes he is overpaying for the firm.
Mr Musk has said he doesn’t “care about the economics” of the purchase. However, he will take on a company with a chequered record of financial performance.
Despite its influence, Twitter has rarely turned a profit and user growth, particularly in the US, has slowed.
The company, founded in 2004, ended 2021 with $5bn in revenue and 217 million daily users globally – a fraction of the figures claimed by other platforms such as Facebook.
Bret Taylor, chair of Twitter’s board, said it had fully assessed Mr Musk’s offer and it was “the best path forward for Twitter’s stockholders”.