The federal government has sued Elon Musk for securities fraud, accusing the Tesla CEO of misleading investors when he tweeted last month he planned to take the electric-car maker private. The Securities and Exchange Commission filed a complaint in federal court Thursday, alleging Musk misled investors when he tweeted on Aug. 7 that he had obtained funding. Musk made it seem “that funding for this multi-billion dollar transaction had been secured, and that the only contingency was a shareholder vote,” the complaint states. “In truth and in fact, Musk had not even discussed, much less confirmed, key deal terms, including price, with any potential funding source.” Musk also promised on Twitter that retail investors would be able to maintain their stake in a private Tesla, even though, SEC officials alleged, he had been told before tweeting that this would be “very difficult.” SEC officials detailed the chaos that ensued after Musk’s tweet. “Within minutes of the tweet, Tesla’s own head of investor relations questioned whether it was genuine,” Steven Peikin, co-director of the SEC’s enforcement division, told reporters. Twelve minutes after the tweet, the head of investor relations was texting Musk’s chief of staff, asking “Was this text legit?” according to…