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.”
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.
It is not clear who will lead the company moving forward. Twitter is currently led by Parag Agrawal, who took over from co-founder and former boss Jack Dorsey last November.