State Sen. Kwame Raoul won close contest Tuesday over former Gov. Pat Quinn in the Democratic race to replace departing Illinois Attorney General Lisa Madigan.

Quinn appeared within striking distance of a political comeback just four years after losing the governor’s race to Bruce Rauner, with 27 percent of the vote to Raoul’s 31 percent, with more than half of precincts counted statewide.

Around 10:30 p.m., Raoul took the stage at the downtown Sheraton to declare victory over Quinn and a half-dozen contenders, stating Quinn had called him to concede the race.

After thanking Quinn and the six other candidates in the race, Raoul’s victory speech sounded out themes that will likely become familiar in a general election race against Republican Erika Harold.

Raoul, the son of Haitian immigrants, pledged to protect the rights of immigrant families in Illinois if elected and jabbed at Harold for remarks she reportedly made about same-sex parents during the 2000 Miss Illinois pageant.

A then 20-year-old Harold reportedly told pageant judges that she would rather see a child placed in the care of known child abusers than with a loving same-sex couple – a statement Raoul, a former juvenile court prosecutor, scorned without naming his opponent.

“One’s sexual orientation does not have anything to do with whether you are able to provide a safe, loving home,” Raoul said. “I’ve taken children out of homes where they have been exposed to child abuse and no way I would put them back in another such a home, and anybody who would do so is not qualified to be the chief law enforcement officer of the state of Illinois.”

Among the remaining half-dozen candidates in the Democratic field for AG, only Sharon Fairley, former head of the Chicago Police oversight agency, tallied support in double digits.

From left, Democratic hopefuls for Illinois attorney general Scott Drury, Sharon Fairley, Aaron Goldstein, Renato Mariotti, Pat Quinn, Kwame Raoul, Nancy Rotering and Jesse Ruiz. | James Foster / Sun-Times

As the race tightened and downstate results trickled it, Quinn’s supporters gathered at the downtown headquarters of the Chicago Regional Council of Carpenters.

Raoul was leading in Cook County and Chicago precincts, while Quinn was outperforming Raoul in downstate areas where his name is better-known than the South Side senator. Quinn has been on the statewide primary ballot 10 times since 1986.

But there were not enough Democratic votes outside the northeast corner of the state to carry Quinn back to the general election ballot.

Unions gave Raoul multiple six-figure campaign contributions, but Quinn tagged Raoul for some $160,000 in donations from tobacco sellers and utility companies. Quinn had cast the role of attorney general as the state’s leading consumer advocate, and said the contributions would compromise Raoul in dealing with power companies on consumer and environmental issues and in tobacco litigation.

Raoul characterized Quinn as a “failed governor.” A late-season campaign ad featured tape of late Chicago Mayor Harold Washington berating Quinn, who had worked in the Washington administration.

Highland Park Mayor Nancy Rotering led the rest of the Democratic field, with 9 percent of the vote, trailed by former federal prosecutor Scott Drury, a suburban state representative who touted his independence from Democratic House Speaker Mike Madigan. Drury, the only Democrat in the house who did not to vote for Mike Madigan for speaker in 2017, received 7.5 percent of the vote.

Chicago Park District Board President Jesse Ruiz tallied just under 6 percent of the vote, finishing ahead of former federal prosecutor and frequent cable news commentator Renato Mariotti and Aaron Goldstein, a defense attorney who once represented disgraced former Gov. Rod Blagojevich.