Tesla chief executive Elon Musk has sold about 4.5 million shares of the electric car maker's stock, raising more than five billion dollars (£3.7 billion), after making a promise on Twitter.

The sales, disclosed in 10 regulatory filings late on Wednesday, amount to about 3% of Mr Musk's stake in the company.

About 1.1 billion dollars (£820 million) will go towards paying tax obligations for stock options granted to Mr Musk in September.

Last weekend, Mr Musk said he would sell 10% of his holdings in the company, worth more than 20 billion dollars (£14.9 billion), based on the results of a poll he conducted on Twitter.

The sale tweets caused a sell off of the stock on Monday and Tuesday, but it recovered some on Wednesday.

The shares were up 2.6% to 1,096 dollars in extended trading on Wednesday, and they have risen more than 50% this year.

The filings also disclosed that Mr Musk exercised options to buy just over 2.1 million shares for 6.24 dollars each.

The company's stock closed on Wednesday at 1,067.95 dollars per share.

The tax transactions were "automatically effected" as part of a trading plan adopted on September 14 to sell options that expire next year, according to forms filed with the US Securities and Exchange Commission.

That was nearly two months before he floated the idea of the sale on Twitter.

After the transactions, Mr Musk still owns about 167 million Tesla shares.

Mr Musk was Tesla's largest shareholder as of June, owning about 17% of the company, according to data provider FactSet.

He is the wealthiest person in the world, according to Forbes, with a net worth of around 282 billion dollars (£210 billion), most of it in Tesla stock.

Wedbush analyst Daniel Ives calculated that Mr Musk has about 10 billion dollars (£7.4 billion) in taxes coming due on stock options that vest next summer.

The sometimes abrasive and unpredictable Mr Musk said he proposed selling the stock as some Democrats have been pushing for billionaires to pay taxes when the price of the stocks they hold goes up, even if they do not sell any shares.

However, the wording on unrealised gains, also called a "billionaires tax", was removed from President Joe Biden's budget, which is still being negotiated.

"Much is made lately of unrealised gains being a means of tax avoidance, so I propose selling 10% of my Tesla stock," he tweeted on Saturday afternoon.

"Do you support this?"

Tesla does not pay Mr Musk a cash salary, but he has received huge stock options.

"I only have stock, thus the only way for me to pay taxes personally is to sell stock," Mr Musk tweeted.

Tesla is based in Palo Alto, California, although Mr Musk has announced it will move its headquarters to Texas.