5:28 PM PT -- Danny Masterson was all smiles after leaving the courtroom, holding hands with his actress wife, Bijou Phillips, who was also grinning.
The actor was peppered with questions about the trial as he walked away from the courthouse, but he just smiled and kept it moving.
Danny and Bijou had a pep in their step ... and he clearly looks happy with the trial result.
His trial attorney Philip Cohen tells TMZ ... "l am so thankful for the incredible care and commitment that the jurors showed in this case. This trial was about nothing other than the credibility of the three accusers and that credibility could only be determined by comparing, contrasting and focusing on the ever evolving statements given by the women."
He adds, "The vote count says it all and it is a true testament to our justice system that the jurors were able to see through all the inflammatory noise and focus solely on what was truly important."
Danny Masterson's rape trial has come to an end ... a judge has declared a mistrial after a hung jury.
Masterson was in a Los Angeles courtroom Wednesday waiting to hear a verdict, when the jury announced it deadlocked. The judge then declared a mistrial.
The jury began deliberations 2 weeks ago after 4 weeks of testimony from alleged victims. They had a break because of Thanksgiving, and two jurors were replaced on Monday with alternates after testing positive for COVID.
It's unclear if prosecutors will decide to try the actor again.
He was facing a maximum sentence of 45 to life behind bars if found guilty of the charges.
As we reported, Masterson was charged back in 2020 with 3 counts of rape, with the alleged victims claiming the incidents occurred between 2001 and 2003 ... right in the middle of the run of his sitcom, "That '70s Show."
Masterson's former attorney, Tom Mesereau, told TMZ at the time ... "Mr. Masterson is innocent, and we’re confident that he will be exonerated when all the evidence finally comes to light and witnesses have the opportunity to testify."
The actor pled not guilty to the charges ... and while he never testified in his own defense, he and his legal team maintained that the incidents either didn't happen or were consensual.