Outspoken entrepreneur Mark Cuban was found not liable Wednesday of civil insider trading charges brought by the Securities and Exchange Commission, his lawyer said in a statement.

The federal court jury in Dallas found the controversial owner of the NBA's Dallas Mavericks and star of the reality television show "Shark Tank" did not break federal rules when he dumped his whole stake in the company Mamma.com in 2004 before details of a pending stock offering were announced. The sale of the stock, which Cuban did not deny, avoided a $750,000 loss on the holding.

At that time, Cuban was the largest individual shareholder in Mamma.com, a search software company that has since changed its name to Copernic and been purchased by Constellation Software (CNSWF). He was contacted by the company's CEO and told the company intended to sell more shares to raise funds.

According to testimony presented at the trial, Cuban became angry and said he opposed the sale because it would dilute his 6% stake. But he sold his entire stake of 600,000 shares after getting more details of the planned stock sale from the company's financial advisers.

Related: The gray art of not quite insider trading

Cuban argued in court that while he was prohibited from disclosing the plans for a stock sale by the company, he was not prohibited from selling his shares on the information.

"We are extremely pleased with today's verdict," his attorney, Stephen A. Best, said in a statement. "The evidence we presented made clear that all the relevant information was in the public domain."

SEC spokesman John Nester said in a statement that the commission respects but is disappointed by the jury's decision, "It will not deter us from bringing and trying cases where we believe defendants have violated the federal securities laws," he said.

The case has dragged on for five years since the SEC first brought charges against Cuban. In July 2009, U.S. District Court Judge Sidney Fitzwater granted Cuban's motion to dismiss the case. But a court of appeals decision reinstated the case. Fitzwater was the judge in the case that went to the jury on Tuesday..

The NBA has fined him an estimated $1.8 million through a course of 19 infractions during his career, according to Bleacher Report -- including a $100,000 fine once for telling CNNMoney of his interest in signing LeBron James a month before the superstar formally became a free agent.

Cuban made most of his fortune when he sold the Internet company he started, Broadcast.com, to Yahoo for $5.7 billion in 1999. Yahoo ended up shuttering the Internet broadcaster just a few years later.