(NEXSTAR) – A battle over whether masks or other face coverings are mandatory in the classroom is playing out around the country. Some states are mandating masks in the classroom, others are banning them. Who gets to have the final word? Here’s how the messy legal fight is shaking out.

What the CDC says

The Centers for Disease Control and Prevention updated its guidance on masking in schools last Wednesday to “recommend universal indoor masking for all students, staff, teachers, and visitors to K-12 schools, regardless of vaccination status.” However, the CDC doesn’t have the authority to mandate masking in schools. That’s why we’re seeing different rules in different districts and states.

Is it the school district or the state who decides?

It depends on where you live. In some states, like California, Kentucky and Illinois, the state is mandating mask wearing in classrooms. In other states, like Hawaii, Michigan and Ohio, it’s being left up to the district to decide the rules for their schools.

Now here’s where things get complicated. Some states, like Arizona, Arkansas, Florida and Texas, have actually banned school districts from requiring masks. In Oklahoma, school districts don’t have the option of requiring masks either, unless the governor declares a state of emergency, which he says he doesn’t intend to do.

But with infections and hospitalizations on the rise and vaccinations out of reach for young children, districts in some blue-leaning urban areas especially are rebelling against the laws and requiring masks in schools — even if it means facing consequences from governors and courts. Districts in Phoenix, Dallas, Houston, Austin, San Antonio and Broward County, Florida, are among those defying the mask laws.

Courts getting involved

As school districts and states argue over who gets to decide if masks are required, banned or neither, the court system is weighing in. So far, the state bans on mask mandates aren’t faring very well.

Arkansas’ ban on mask mandates was temporarily blocked last week by a state judge who said the prohibition violated the state’s constitution. That decision could be appealed to a higher court, but for now Arkansas can’t enforce its mask ban.

In Texas, where COVID-19 hospitalizations have spiked to their highest level in six months, a judge sided with San Antonio and temporarily allowed the city, county and public schools to require masks. A Dallas court also stepped in Wednesday to temporarily block the governor’s mask ban in its county.

The Associated Press contributed to this report.