Over the weekend, the Republican candidate for Illinois attorney general, Erika Harold, seized on Illinois House Speaker Michael Madigan’s last-minute $1 million infusion into the campaign fund of her Democratic rival, Kwame Raoul.

The donation “shows me how concerned he is about having me as an independent check” on state government, Harold told one TV news station, referring to Madigan, who’s also the head of the Illinois Democratic Party. “And it shows me my message is gaining traction.”

But Harold’s message — that Raoul is beholden to Madigan, that Madigan’s the prince of Illinois political corruption — didn’t gain enough traction for her to become the state’s top legal officer overseeing a public agency that serves as state government’s law firm and a consumer watchdog. At 8:30 p.m., she conceded the race and said she “would be rooting” for Raoul “to do an exceptional job.”

Late Tuesday, with 90 percent of precincts tallied, Raoul carried a sizable lead over Harold, about 54.4 percent to 43.1 percent, as Libertarian candidate Bubba Harsy fell way behind both.

While some predicted the race would be a “nail-biter,” Raoul said in a victory speech Tuesday night “numbers don’t lie.”

Later, he said: “There is a lot of work to do. This campaign was just an audition for the work to be done.”

For live election results, visit the Sun-Times election guide.

Raoul will take office Jan. 14, formally replacing Madigan’s daughter, Lisa Madigan, who decided not to run for a fifth four-year term as attorney general, and who attended Raoul’s victory celebration at the Fairmont Chicago Millennium Park Hotel downtown.

“Kwame is ready, he is willing, he is able to fight for us,” Lisa Madigan said Tuesday night.

The race for Illinois governor may have been at the top of the ballot, but many polls and pundits foreshadowed it wouldn’t be much of a contest come Election Day. Indeed it wasn’t, and the Republican incumbent, Bruce Rauner, quickly conceded to Democrat J.B. Pritzker early in the evening.

The attorney general’s race was a different story.

Raoul’s victory was regarded by political experts as no sure thing, even though Democratic candidates in Illinois were expected to benefit from voter anger over President Donald Trump and his Republican allies; even though former President Barack Obama, a Democrat still popular in Illinois, endorsed Raoul; and even though Raoul’s campaign fund raised about $12 million since he announced in 2017 he was running.

So until the polls closed at 7 p.m. Tuesday, it was a serious contest on both sides – with Harold’s campaign even sending out an email to supporters at 4:40 p.m. urging those who hadn’t yet voted to do so and declaring, “This race is closer than ever and today’s turnout will make all the difference.”

Turns out the race wasn’t very close at all, particularly in Cook County where Raoul secured nearly 72 percent of the vote with almost 91 percent of precincts reporting.

In some smaller Downstate counties, Harold bested Raoul, records show.

Either way, the contest was marked by sharp accusations in the preceding days and months.

While Harold linked Raoul to Michael Madigan — and portrayed them both as tax-hiking fiends — Raoul painted Harold as too politically extreme for Illinois, opposed to abortion and certain same-sex rights.

In fact, pro-Raoul TV commercials highlighted comments that Harold — a former Miss America who attended Harvard Law School — allegedly made when she was 19 during a beauty pageant. Asked a hypothetical question about whether she’d place a foster child with a “loving gay couple” or an abusive heterosexual home, she chose the latter, as NBC5 reported.

Harold, who is 38 and lives in Urbana, said during the campaign she doesn’t remember making those remarks but, regardless, now supports same-sex fostering and adoption. Her campaign said that while she’s “pro-life,” she’d enforce the laws on the books, including those allowing abortion.

She had sought to become the first African-American woman to hold the post.

Her big-money donors included Rauner, who ponied up $1.8 million, and his pal, conservative billionaire Ken Griffin, who donated $1.7 million, records show.

Her campaign expected Raoul — a 54-year-old South Side state senator and former prosecutor — and his allies to outspend Harold by three to one. Pritzker’s campaign donated nearly $3 million alone to Raoul’s political fund.

Raoul’s campaign also accepted significant help from casino magnate Neil Bluhm, and generous donations from electric supplier ComEd and its affiliates, even though utilities have faced scrutiny from the attorney general’s office in recent years.

During the campaign, Harold has not only portrayed herself as a needed check on one-party dominance in Illinois, but as someone who’d go after political corruption.

“As attorney general, I’ll make the politicians pay for their corruption, not you,” she said in one commercial.

A similar claim was made in 2002 when Lisa Madigan won for the first time. “We will fight . . . corrupt public officials,” she said back then.

The reality is Lisa Madigan ended up doing relatively little in that arena. State law actually boxes in the Illinois attorney general, who in most instances has to be asked by — or get permission from — a county state’s attorney to initiate public corruption and some other criminal proceedings.

Much of the attorney general’s workload involves defending state government in lawsuits and other often-routine legal duties. But the office also has been used as a bully pulpit to champion consumer causes.

Contributing: Therese Pokorney, Emily McTavish