It was another slam dunk for Mark Cuban — only in a different kind of court.

A Dallas federal jury Wednesday cleared the billionaire owner of the NBA’s Mavericks of insider trading charges — ending a bitter half-decade battle between Cuban and the Securities and Exchange Commission.

The Wall Street watchdog got an earful from Cuban outside the Dallas courthouse, where he blasted the SEC for “trying to deceive the jury.”

“When you take all these years off my life, it’s personal,” Cuban told reporters after his victory.

After less than four hours of deliberation, the nine-member jury found that the SEC had failed to prove that Cuban knew he was in possession of nonpublic information about Internet company Mamma.com when he sold his $7.9 million stake in 2004.

The SEC sued Cuban — worth an estimated $2.5 billion — for the $750,000 he would have lost had he held onto the shares, as well as fines for violating securities laws.

“We respect the jury’s decision,” SEC spokesman John Nester said in a statement. “While the verdict in this particular case is not the one we sought, it will not deter us from bringing and trying cases where we believe defendants have violated the federal securities laws.”

But Scott Kimpel, a former SEC staff lawyer, said the loss could force the regulator to think twice about pressing cases in which it’s unclear whether the person in question had a duty to keep the information he or she received confidential.

“All these cases require a breach of some duty and here it wasn’t clear he [Cuban] had a duty to anybody,” Kimpel said.

The SEC pinned its case on testimony from former Mamma.com CEO Guy Fauré, who said he asked Cuban to keep mum about news of a private stock offering that would cause the share price to drop.

In pre-recorded testimony, Fauré said that when Cuban heard the news his response was, “I’m screwed. I can’t sell.”

Cuban said he never made any such promise, and his lawyers blasted Fauré as an unreliable witness who refused to testify in person and face the jury.