Chicago Mayor Lori Lightfoot, the Democrat, announced on Wednesday that her office filed an unfair labor practices complaint after the city’s teachers union voted to switch to remote learning due to a surge in COVID-19 cases. 

Lightfoot told CBS Chicago that she hoped to come to some kind of an agreement at the bargaining table, not a courtroom. But she called the latest moves from the union an "illegal strike."

The Chicago school system announced Wednesday that classes were canceled for a second-straight day and parents were—once again—given just hours’ notice that there were no classes, Fox 32 reported.

"I will not allow them to take our children hostage," Lightfoot said. "I will not allow them to compromise the future of this generation of CPS students. That is not going to happen."

Jesse Sharkey, the Chicago Teachers Union president, criticized the mayor for threatening the legal action.

Chicago Mayor Lori Lightfoot attends a Chicago Police Department promotion and graduation ceremony on October 20, 2021. (Photo by Scott Olson/Getty Images) (Scott Olson/Getty Images)

"If the mayor needs to drag us into court, you know, in order to try to force us to do what she wants, we’re going to go into court and point out that we’re doing what we think is necessary," he said.

LIGHTFOOT BLASTS TEACHERS UNION AS SECOND DAY OF CLASSES CALLED OFF

A sign is displayed on the front of the headquarters for Chicago Public Schools on January 05, 2022 in Chicago, Illinois. (Photo by Scott Olson/Getty Images) (Scott Olson/Getty Images)

The union argued the district’s safety protocols are lacking and both teachers and students are vulnerable. Chicago has rejected a districtwide return to remote instruction, saying it was disastrous for children’s learning and mental health. 

A sign on the fence outside of Lowell elementary school welcomes students on January 05, 2022 in Chicago, Illinois. (Photo by Scott Olson/Getty Images) (Scott Olson/Getty Images)

District officials said schools would offer food service from 9 a.m. to 12 p.m. and COVID-19 testing would continue as scheduled, but afterschool activities would be canceled. The district also provided a list of city sites with available daycare.

Pedro Martinez, the Chicago Public Schools chief executive, called Tuesday’s vote for remote learning an "illegal strike."

GET THE FOX NEWS APP

"Under state law, we are not authorized to go remote as a district," Martinez said, according to CBS Chicago. "We are not authorized."

The Associated Press contributed to this report