Cook County Judge Michael Toomin on Friday set a June 21 date for when he will decide whether to appoint a special prosecutor to investigate how State’s Attorney Kim Foxx and her office handled the criminal case against “Empire” actor Jussie Smollett.

Retired judge Sheila O’Brien in April filed a petition seeking an independent probe of how Foxx and her staff earlier this year reached the controversial decision to drop all disorderly conduct charges against Smollett for allegedly staging a fake hate crime.

During the two hour hearing at the Leighton Criminal Courthouse, Toomin swatted down several motions by O’Brien, including one to substitute another judge. Toomin occasionally gibed at O’Brien, and dismissed her motions with rhetorical flourishes — calling her motions to subpoena Foxx, Foxx’s top deputy, and Democratic powerbroker Tina Tchen “totally improper”— but did not seem to dismiss the idea that a special prosecutor was required.

O’Brien repeatedly pointed out case law that a special prosecutor is required when an elected prosecutor has an “actual conflict” involving a pending case. Foxx herself had acknowledged a conflict when her ethics officer sent an email to staff announcing Foxx was “recused” from Smollett’s case, O’Brien said.

“At that moment, the court has an obligation to appoint a special prosecutor. When she said that, she indicated she did not think she could do her duties,” O’Brien said, adding later, “She’s the one that says ‘I’m out.’”

Assistant State’s Attorney Cathy McNeil Stein argued that the county Office of the Independent Inspector General already has started an investigation of the Smollett case. Inspector General Patrick Blanchard will issue a report that, if it uncovers apparent wrongdoing, could be used as the basis for a special prosecutor investigation. O’Brien’s tactics, if allowed, could lead to similar special prosecutor requests in any case where someone disagreed with a decision made by the state’s attorney.

“That is why you elect a prosecutor. The state’s attorney has a right to run the office and determine what is appropriate and what is not appropriate,” McNeil Stein said.

Special prosecutors are rarely appointed, and Toomin, one of the longest-serving judge in Cook County has twice reviewed petitions for an outside review of controversial cases. He granted a petition to assign a special prosecutor to investigate the death of David Koschman, who was killed by a punch from Richard “R.J.” Vanecko, a nephew of former Mayor Richard M. Daley. Toomin did not appoint a special prosecutor to probe the investigation that led to the arrest of two pre-teen boys in the murder of 11-year-old Ryan Harris.

Toomin noted that a special prosecutor would be able to issue grand jury subpoenas, authority that the inspector general would not have, and also reminded O’Brien that an IG investigation took place alongside a special prosecutor probe in the Koschman case.