NEW YORK (Reuters) - A U.S. court judge threw out an insider trading case against Dallas Mavericks basketball team owner Mark Cuban on Friday, but gave the U.S. Securities and Exchange Commission a month to file an amended lawsuit.

Dallas Mavericks team owner Mark Cuban (C) jokes with reporters as he leaves the Earle Cabell Federal Court building after attending a hearing held to address the insider trading suit filed against him by the Securities and Exchange Commission in Dallas, Texas May 26, 2009. REUTERS/Jessica Rinaldi

Cuban, one of the 400 richest Americans, faced civil charges that he acted on nonpublic information when he sold his stake in Internet search engine company Mamma.com to avoid more than $750,000 in losses.

The SEC failed to allege that Cuban undertook a duty to refrain from trading information on a public stock offering that Mamma.com had planned, U.S. District Judge Sidney Fitzwater wrote in his ruling.

“Cuban cannot be held liable under the misappropriation theory of insider trading liability, even accepting all the well-pleaded facts as true and viewing them in the light most favorable to the SEC,” Fitzwater wrote.

He gave the SEC 30 days to file an amended complaint, “if the SEC can allege that Cuban undertook a duty, expressly or implicitly, not to trade or other otherwise use material, nonpublic information.”

Paul Coggins, a lawyer at Fish & Richardson who represented Cuban, said he would be surprised if the SEC refiled.

“Frankly I think the government can’t prove the facts that they put in the first round, so I would be surprised if they re-plead here,” said Coggins. “I think they threw everything they had and more into this.”

Cuban, who is worth $2.6 billion according to Forbes magazine, did not respond to an email seeking comment.

He is an avid blogger at website blogmaverick.com, but it had no update on Friday morning. He also has a Twitter account. "Its been a great day so far, and its only going to get better! Back to Dallas to see the (family)," he posted on the account around noon ET (1600 GMT).

“As far as media, im not going to be commenting at all, but thx for asking,” he later wrote on Twitter.

The SEC declined to say if it would file an amended case. “We are reviewing the court’s ruling and weighing our options,” said Scott Friestad, associate director of the SEC’s Division of Enforcement.

Cuban has a range of business interests and other activities. His hot temper when arguing with referees during Mavericks games has earned him almost $1.7 million in fines. His dancing skills landed him on the television show “Dancing With the Stars.”

Cuban also owns HDNet, a national high-definition television network, and Landmark Theatres. Magnolia Pictures, the theatrical and home entertainment distribution company that he co-owns through the company 2929 Entertainment, released the documentary “Enron: Smartest Guys in the Room.”

He also is the majority partner in ShareSleuth.com, a site that reports on “securities fraud and corporate chicanery,” according to its website.

According to the SEC’s original complaint from last November, Quebec-based Mamma.com invited Cuban in June 2004 to participate in a private placement offering after he agreed to keep the information confidential.

When Cuban found out the offering would dilute the holdings of existing shareholders and be sold at a discount to the market price, he became “angry and upset,” the SEC said.

At the end of a call with Mamma.com’s CEO, Cuban said: “Well, now I’m screwed. I can’t sell,” according to the SEC’s complaint. Later, he told his broker, “Sell what you can tonight and just get me out the next day,” the SEC alleged.

During after-hours trading on June 28, 2004, Cuban sold 10,000 of his 600,000 shares and the following morning sold his remaining stake. After markets closed, Mamma.com announced its offering. When markets reopened the following day, the company’s stock fell 9.3 percent at $11.89.

According to the complaint, Cuban later publicly said he sold his stake because the company was conducting a private investment in public equity (PIPE), which issued shares at a discount to the market and would have diluted his stake.

The complaint alleged Cuban never disclosed to Mamma.com he was going to sell shares before the company’s announcement.

Mamma.com has since changed its name to Copernic Inc. Its shares were down 3.8 percent at 25 cents on the Nasdaq on Friday.

The SEC filed its civil case in the U.S. District Court for the Northern District of Texas in Dallas. The case number is 3:08-CV-2050-D.