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.

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.

"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.

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.