A North Side Democrat says she was forced to resign from a part-time job in the Cook County Sheriff’s office as political payback for her criticism of Illinois House Speaker Mike Madigan’s handling of sexual harassment allegations — a claim the sheriff’s office vehemently denies.

State Rep. Kelly Cassidy — who has worked part-time in the sheriff’s office since January 2015 — said Madigan’s chief of staff Tim Mapes called the sheriff’s office in February to check on her employment, within days of her vocal opposition of Madigan’s handling of harassment claims.

“It was very chilling, … It felt like a warning, very clearly,” Cassidy said of the employment check-in.

And last week, Cassidy said state Rep. Bob Rita, a Madigan ally, questioned how she could oppose a bill supported by her “boss,” Cook County Sheriff Tom Dart.

“It was clear to me that this would be the first of an unlimited number of shots at me, and I respect the sheriff [Tom Dart] too much and the work they do. But I felt like the only way that I could bring an end to this is to come out,” Cassidy said.

Cassidy said she resigned, but believes what happened is a clear form of “retaliation.”

“My speaking out is about wanting to be safe from retaliation in this workplace, and I believe that the only way to do it is to take this public,” Cassidy said. “What kind of an example am I setting for my kids if I allow myself to be silenced in this way?”

“You don’t get to get to sit on the executive committee without being loyal,” Cassidy said of Rita’s allegiance to the speaker.

Cassidy was among the first to call for an independent investigation into how Madigan’s political operation had handled sexual harassment claims.

“The slow and steady drip of accusations and dismissals has turned into an endless cycle of lather, rinse, repeat, highlighting the culture of harassment in the legislature and political campaigns,” Cassidy said in a statement in February. “I am calling for an independent investigation into this culture that appears to pervade the organizations led by Speaker Madigan.”

On Monday, Cassidy said she endured retaliation by the speaker because of her vocal opposition, leading to her resignation in the Cook County Sheriff’s office. Cassidy had worked part-time in the sheriff’s office since January 2015, working with a small group on jail-related and other criminal justice issues, the sheriff’s office said.

Cara Smith, spokeswoman for the sheriff’s office, said Cassidy resigned from her part-time post because she opposed a bill the sheriff’s office had been strongly pushing — a measure that would place inmates on the sex offender registry upon release if they expose themselves or masturbate in front of female staffers more than two times.

The measure cleared the Senate last month, but has stalled in the Illinois House. Cassidy co-chairs the Judiciary-Criminal committee, which the bill was assigned to.

In a statement, Smith said Cassidy opposed the bill, leading to her resignation.

“Based on this philosophical difference, she submitted her resignation which we accepted,” Smith said in the statement.

Smith acknowledged she spoke with Rita to “discuss the bill and strategies to advance it.”

“He raised a concern of Kelly not supporting the bill and shared that he had worked for other elected officials and that if he didn’t support their priorities, he wouldn’t have a job,” Smith said. “It was just a statement of fact from him, his position. I didn’t interpret it as anything other than his surprise that Kelly did not support the sheriff’s bill.”

Smith confirmed that Mapes called, but said: “It seemed to me just a routine question,” asking to “confirm whether Cassidy worked for us.”

Asked about possible retaliation against Cassidy, Madigan spokesman Steve Brown said “it would be normal for a number of us to talk to the sheriff’s office.”

Rita did not immediately respond to a call for comment Monday afternoon.

Rita has also figured in the criticism Madigan has faced on harassment issues.

The powerful House speaker backed Rita when the Blue Island Democrat was first elected to the state House in 2002, after an ex-girlfriend had accused Rita of attacking her in her Evergreen Park home. Rita was acquitted the following year of domestic violence and criminal trespassing charges.

But the 16-year-old case resurfaced earlier this year when Rita’s Democratic primary challenger held a news conference with the ex-girlfriend, Liz Hogan, who accused Madigan of deliberately ignoring the domestic violence complaint.

Madigan’s spokesman said the speaker had no memory of a meeting Hogan said her father had with Madigan in 2002. And Rita stood by the jury verdict, saying Hogan’s accusations were “false then and are false today. “