Last week, Elon Musk became Twitter's largest shareholder. The Tesla and SpaceX CEO was going to join Twitter's board — then he wasn't.

Now the world's richest person is offering to buy the company for $43 billion — $54.20 per share — in cash, according to a regulatory filing posted Wednesday.

"I made an offer," Musk tweeted.

Musk says he believes in the potential of Twitter and that the social media company needs to be transformed.

"My offer is my best and final offer and if it is not accepted, I would need to reconsider my position as a shareholder," Musk said in the filing.

He holds more than 9% of Twitter's shares.

Twitter has extraordinary potential. I will unlock it," Musk added.

I invested in Twitter as I believe in its potential to be the platform for free speech around the globe, and I believe free speech is a societal imperative for a functioning democracy," he said.

Twitter said it has received the "unsolicited" offer from Musk.

In a statement, the company said its board "will carefully review the proposal to determine the course of action that it believes is in the best interest of the Company and all Twitter stockholders."