Mark Cuban, the billionaire owner of the Dallas Mavericks basketball team, suffered a legal setback on Monday when a Dallas federal judge threw out one of his defenses in a Securities and Exchange Commission insider-trading lawsuit.

U.S. District Judge Sidney Fitzwater said Cuban failed to show that the SEC had investigated him improperly, which would have allowed him to argue that the regulator had unclean hands. The SEC had asked the judge to block Cuban from using such a defense in court.

Cuban has failed to allege facts that give the SEC fair notice that the misconduct on which he relies resulted in prejudice to his defense of the enforcement action that rises to a constitutional level, the judge wrote.

This is fatal to his unclean hands defense.

The SEC sued Cuban in 2008, alleging that he sold his 6.3 percent stake in in June 2004 after learning confidentially that the Montreal-based search engine company was planning a stock offering. It said Cuban's sale allowed him to avoid more than $750,000 of losses.

Lyle Roberts, a lawyer for Cuban, said SEC Inspector General David Kotz was separately looking into Cuban's allegations of improper conduct by the SEC. He characterized the judge's ruling on Monday as a minor issue.

We have a very long list of defenses, the key being that it didn't happen, Roberts said. Mr. Cuban did not enter into any confidentiality agreement or violate any such agreement.

A federal district judge dismissed the SEC case in July 2009, saying Cuban did not qualify as an insider, and at most had entered a confidentiality agreement with rather than an agreement not to trade.

A federal appeals court in New Orleans reinstated the lawsuit last September, ordering Cuban to face the SEC allegations.

Fitzwater did not take any position on whether Cuban's allegations of investigative misconduct by the SEC had merit.

Those allegations include witness intimidation, and proceeding with a legal action prior to completing an investigation.

The case is SEC v. Cuban, U.S. District Court, Northern District of Texas, No. 08-02050.

(Reporting by Sarah N. Lynch in Washington, D.C. and Jonathan Stempel in New York; Editing by Ted Kerr)