A Cook County judge on Friday ordered the appointment of a special prosecutor to investigate the Jussie Smollett hate hoax case.

Under the order, the special prosecutor would probe the decision by State’s Attorney Kim Foxx’s office to drop 16 felony charges against the actor. Judge Michael Toomin said the special prosecutor would be able to file charges against Smollett if there are “reasonable grounds to believe that any other criminal offense was committed.”

In addition,the judge ruled that Foxx had no legal grounds to appoint her top deputy to oversee the case after she recused herself. Foxx’s action resulted in a “fictitious office” with no “legal existence” having control over the Smollett case, Toomin wrote.

“There was an is no legally cognizable office of Acting State’s Attorney known to our statues or to the common law,” the judge wrote. “Its existence was only in the eye or imagination of its creator, Kim Foxx.”

TRENDING: This Is America? Young Mother TASED, CUFFED AND ARRESTED for Not Wearing Face-Mask at Mostly Empty Stadium to Watch HS Football Game

The ruling came after Sheila O’Brien, a former appellate judge, called for a special prosecutor to investigate why charges were dropped, NBC Chicago reported. “It’s very thorough and it’s very complete,” O’Brien said of Toomin’s ruling. “Well get the truth, the whole truth, under oath.”

The judge also wrote that appointing a special prosecutor is meant to “restore the public confidence in the integrity of our criminal justice system.”

A Chicago grand jury indicted Smollett in March on 16 felony counts that he allegedly lied to police about being the victim of a racist and homophobic hate crime. Those charges came after he was arrested in February and charged with felony disorderly conduct for the allegedly false police report.

To bolster his claim that the attackers were white, Smollett said the two men yelled racist and homophobic remarks, at one point invoking President Trump’s signature slogan, “Make America Great Again” by saying, “This is MAGA country.”

But the Cook County, Illinois state attorney’s office suddenly dropped all charges and sealed the case. “After reviewing all of the facts and circumstances of the case, including Mr. Smollett’s volunteer service in the community and agreement to forfeit his bond to the City of Chicago, we believe this outcome is a just disposition and appropriate resolution to this case,” the office said in a statement.

Smollett’s lawyers claimed victory, saying in a statement that the actor “was a victim who was vilified and made to appear as a perpetrator as a result of false and inappropriate remarks made to the public causing an inappropriate rush to judgement.”

“Jussie and many others were hurt by these unfair and unwarranted actions. This entire situation is a reminder that there should never be an attempt to prove a case in the court of public opinion. That is wrong. It is a reminder that a victim, in this case Jussie, deserves dignity and respect. Dismissal of charges against the victim in this case was the only just result,” the lawyers said.

After the judge ruled for the appointment of a special prosecutor, Chicago police spokesman Anthony Guglielmi wrote on Twitter: “We stand firmly behind the work of detectives in investigating the fabricated incident reported by Jussie Smollett will fully cooperate with the court appointed special prosecutor.”