Although a strike by the Chicago Teachers Union thankfully ended this week, the damage has been done. The unlawful walkout exposed an indifference not just to science but also to the emotional and academic well-being of more than 340,000 schoolchildren. It also showed why President Biden and other Democratic leaders need to break the grip of teachers unions over the country’s public schools – or risk irreversible damage to the students who can afford it least.

The refusal of Chicago’s teachers to show up to classrooms had forced the city to close all public schools for four days, until a deal was reached on Monday. Union leaders had demanded that the district revert to virtual learning until Jan. 18, and to close all schools again if COVID cases didn’t subside. Mayor Lori Lightfoot had offered to meet some union demands, but rightly refused to bend on calls for schools to shut down altogether if COVID cases exceeded a certain benchmark, pointing out that kids were safer in schools than out of them. However, the narrow vote of approval Wednesday by the union’s full membership revealed that the mayor has agreed to set metrics that would trigger a return to remote learning for individual schools.

This could prove unwise. Given the transmissibility of the omicron variant, it’s inevitable that COVID cases will rise as schools reopen. But the health risk the variant poses to children is far outweighed by the proven cognitive and emotional harm caused by remote learning. Nor would a lack of tests justify systemwide closures. Even if tests are unavailable for all students, the risks of in-person learning can be diminished through vaccination, grouping students in social pods and requiring masks indoors. Under the guise of promoting the safety of students, union leaders had demanded working conditions that far exceed what’s necessary for them to do their jobs safely.

Lightfoot had warned that teachers who didn’t return to the classroom would be docked pay and face possible termination. The city also filed a legal complaint against the union for illegal labor practices. Biden should have stood unequivocally with the mayor in this dispute – and with Chicago’s students, who’ve already suffered far too many interruptions in recent years because of labor disputes.

In the short term, Biden’s influence is largely limited to the bully pulpit. He can, however, do more to prevent unions in other districts from attempting to follow the Chicago union’s lead. At a minimum, federal education funds should be conditioned on how well school districts maintain in-person instruction – something Congress failed to do in last year’s $1.9 trillion COVID relief bill.

Over the longer term, curbing the power of teachers unions will require deeper reforms. The administration should push states to offer alternative forms of teacher certification, which would broaden the teaching labor pool and bring new talent into the profession. Districts should be encouraged to tie teachers’ pay to their performance – including how much time they spend in the classroom – rather than seniority.

Critically, Biden should seize on the unions’ resistance to reopening as reason to increase federal funding for charter schools, which generally employ nonunionized teachers and provide options in areas where traditional schools are failing to deliver, if they’re open at all. Embracing charters would merely align Democrats with parents nationwide, who are voting with their feet: In 2021, enrollment in public charter schools rose 7 percent, compared to a 3 percent drop in traditional schools. (Michael R. Bloomberg, the founder of Bloomberg LP, recently announced a $750 million initiative to support public charter schools.)

Across the board, the impact of the pandemic on students’ learning has been disastrous. The walkout by Chicago’s teachers has potentially subjected hundreds of thousands of kids to additional academic harm. It’s past time for Democratic leaders, starting with the president, to show whose side they’re on.