CHICAGO — Kim Foxx, the Chicago area’s top prosecutor, won the Democratic nomination Tuesday against three challengers who zeroed in on her handling of the Jussie Smollett criminal case.

The primary race for Cook County state’s attorney was one of the most expensive of its kind, particularly with Navy veteran Bill Conway making his first run for public office with millions of dollars in family wealth. He had been running television ads for months questioning her office’s controversial decision to drop charges against the “Empire” actor.

The constant attention put Foxx on the defensive on the campaign trail, touting her record on progressive criminal justice reforms.

“There was an effort to make this election about one big case involving a celebrity,” Foxx said in her victory speech. “The voters have overwhelmingly put that fallacy to rest.”

Smollett is accused of staging a racist, anti-gay attack in Chicago. Foxx recused herself from the Smollett case, but questions loom about whether she acted improperly for speaking to a Smollett relative and aide to former first lady Michelle Obama before the charges were dismissed. A special prosecutor reinstated the charges last month, which Foxx blasted as political.

On the campaign trail, Foxx tried to redirect the attention to her record praised by criminal justice experts, including the work of a conviction integrity unit and reforms to the cash bail system. But she grew increasingly frustrating, referring to the attention on the case as “B.S.”

Still, she led in endorsements and establishment backing. Several super PACS also worked against her opponents, including Conway, a former assistant state’s attorney whose $11.5 million campaign came mostly from his billionaire father, William Conway, co-founder of the Washington D.C.-based Carlyle Group.

“This campaign, for me it’s been a once-in-a-lifetime experience,” the younger Conway said in a concession speech on Facebook Live. He said he didn’t know what was next but he looked forward to continuing his service to the country.

The other Democrats running were former Chicago Alderman Bob Fioretti and former federal prosecutor Donna More.

The win all but guarantees Foxx a second term in November, as Cook County is heavily Democratic. She faces Republican Patrick O’Brien, a former assistant state’s attorney.

Voter Victoria Hamel, 49, of suburban Chicago, cast an early ballot for Foxx, applauding her work to dismiss low-level marijuana convictions as part of the state’s new law legalizing recreational marijuana.

“This is really important for her to get elected so we can keep the forward progress,” she said. “I don’t see why we would want to stop the car, go in reverse and start back over.”