Media playback is unsupported on your device Media caption Who is Elon Musk?

The Securities and Exchange Commission has filed a lawsuit accusing Tesla boss Elon Musk of securities fraud.

The US financial regulator says Mr Musk's claims that he had secured funding to take the electric carmaker private were "false and misleading".

It is seeking to bar Mr Musk from acting as an officer or director of a publicly traded company.

Mr Musk called the action "unjustified" saying he acted in the "best interests of truth, transparency and investors".

"Integrity is the most important value in my life and the facts will show I never compromised this in any way," he said in a statement.

Tesla's board of directors said in a statement that they were "fully confident in Elon, his integrity and his leadership of the company".

Mr Musk startled the business world last month when he took to Twitter to announce that he was considering a plan that would de-list the company from the stock exchange.

He wrote he had "funding secured" for the proposal, which would value Tesla at $420 per share.

Image copyright AFP Image caption Elon Musk with Grimes, the girlfriend he thought the number $420 - noted in marijuana culture - would amuse

The statements "created the misleading impression that taking Tesla private was subject only to Mr Musk choosing to do so and a shareholder vote", according to the SEC complaint, which was filed on Thursday in federal court in New York.

"In truth and in fact Musk had not even discussed, much less confirmed, key deal terms, including price, with any potential funding source," it said.

Marijuana culture

The SEC statement said that, according to Mr Musk, he calculated the $420 price per share based on a 20% premium over that day's closing share price because he thought 20% was a "standard premium" when taking companies private transactions.

This calculation resulted in a price of $419, and Mr Musk stated that he rounded the price up to $420 because he had recently learned about the number's significance in marijuana culture and thought his girlfriend, the Canadian indie singer Grimes, "would find it funny, which admittedly is not a great reason to pick a price".

The 7 August tweets took even people within the company by surprise.

"Was this text legit?" the firm's head of investor relations wrote to Mr Musk's chief of staff, the complaint says.

'Significant confusion'

Tesla shares soared after Mr Musk's announcement, before retreating amid questions and doubts.

Weeks later, Mr Musk backed away from the plan, citing investor feedback.

The SEC, which is also seeking financial penalties, said his claims created "significant confusion" in the stock market and harmed investors.

Media playback is unsupported on your device Media caption Tesla's Elon Musk 'mislead investors' SEC alleges

"Taking care to provide truthful and accurate information is among a CEO's most critical obligations," said Stephanie Avakian, co-director of the SEC's enforcement division.

"That standard applies with equal force when the communications are made via social media or another non-traditional form."

The SEC complaint sent shares of the firm down by more than 10% in after-hours trade.

Analysis

Dave Lee, BBC North America technology reporter, San Francisco:

Whatever the state of mind Elon Musk was in when he announced he had "funding secured", it could end up costing almost everything he holds dear. It would be nobody's fault but his own.

Wall Street veterans - and indeed, anyone with a modicum of knowledge of how the financial markets work - predicted this very scenario the moment those tweets were posted.

Mr Musk is famously an unconventional chief executive, but when it comes to the financial markets, you can't flout the rules without serious consequences.

It's clear, from emails contained in the SEC's filing, that staff at Tesla were caught completely off guard. His head of investor relations asked if the tweets were "legit". The Nasdaq, confused, halted trading. It all makes Mr Musk unfit to run a public company, the SEC says.

All this because of a tweet sent because Mr Musk thought his girlfriend "would find it funny".

Image copyright Getty Images Image caption Mr Musk is credited with pushing the car industry toward electric vehicles

Mr Musk, who co-founded Tesla and has served as chief executive since 2008, is a divisive figure in the business world, who has inspired passionate fans and critics.

Supporters credit Mr Musk, also the head of the rocket company SpaceX, with pushing the car industry to produce electric cars.

But his critics - including many who have made investments predicting the firm's stock will fall - argue that Tesla has consistently lost money and struggled to increase its output, repeatedly missing its own targets.

The financial pressure facing Tesla has mounted this year, as it boosts spending to increase production of its newest car.

Erratic behaviour

In recent months, Mr Musk's own behaviour has also been in the spotlight.

In July, he drew widespread criticism after accusing a British cave diver involved in the rescue of Thai teenagers from a flooded cave of being a child abuser.

The diver later filed a defamation suit.

He also drew attention after an emotional interview with the New York Times, in which he said he worked "120-hour weeks" and took sedatives.

And earlier this month, he smoked marijuana live on the web during a podcast with comedian Joe Rogan.