Students at more than 2,500 schools across the United States are planning to walk out of class at 10 am in each time zone Wednesday to protest congressional inaction on gun control.

The National School Walkout will be a 17-minute protest, in honor of the 17 people who died in the school shooting in Parkland, Florida, last month. The walkout is being organized by Youth Empower, a division of the national Women’s March group.

The protest aims to raise awareness of the students’ demands for gun control before a march later this month in Washington, DC. The demands include banning assault-style weapons and expanding background checks to all gun buyers.

Because the walkout is scheduled during school hours, it has triggered confusion about how teachers and principals should respond. Do students have a right to protest when they should be in class? And are schools allowed to punish students who participate?

Part of the confusion stems from the fact that the answer to both those questions is “yes, to some extent.” Students at public schools have a right to express their political views, but schools have the right to place limits on how they express those views to ensure they don’t disrupt the learning process. Schools can even suspend students in some cases (more on that below).

Civil liberties groups are worried that some schools might be going too far in their punishment threats — potentially infringing on students’ constitutional rights. The American Civil Liberties Union (ACLU) in Nevada warned school administrators across the state about this last week after hearing reports that some had threatened to withhold students’ diplomas and kick students off sports teams for participating in the walkout.

“These forms of punishment far exceed those permitted by statute and are constitutionally suspect,” the ACLU of Nevada wrote in a letter to students.

Not all schools are responding the same way. Some, such as one in Mooresville, Indiana, have chosen to help students plan their walkout. A high school principal in Moline, Illinois, will excuse students who miss class to protest. Others have decided not to get involved in any way.

Here are a few things to understand about a student’s right to protest at school.

Schools can punish students, but not for expressing their political views

It’s completely legal for a school district — or even a state — to discipline students for an unexcused absence if that is school policy. Students under 18 are required by law to go to school in most states, so they can be punished for missing class. But punishment can vary from state to state and from school district to school district. One school might not consider a 17-minute walkout an unexcused absence, while another one might. One school might not suspend students for unexcused absences, while another one would.

For students deciding whether to take part in the walkout, the ACLU urges them to check their school’s policies for missing class.

But let’s say that a school district allows its students to participate in the walkout without punishment. Are there any limits to how students can express their views as part of the protest?

In 1969, the US Supreme Court ruled unequivocally that students at public schools do not “shed their constitutional rights to freedom of speech and expression at the school house gate.” The landmark case, Tinker v. Des Moines Independent Community School District, involved a 13-year-old girl from Des Moines, Mary Beth Tinker, who was suspended for wearing a black armband to protest the Vietnam War.

In the Court’s decision, the justices said that school administrators cannot punish students merely for expressing political views. They can only discipline students if their speech or actions cause “material” or “substantial” disruption to school functions.

This is important in the context of the national walkout. Does a mass walkout qualify as a “substantial” disruption in the school? That’s a call school officials would have to make. But they would have to show that the walkout made it impossible for school staff to do their jobs or for teachers to continue their lessons with those who stayed in class.

Furthermore, the school cannot impose a punishment that goes beyond usual school policy. For example, principals can’t suspend students for three days for participating in the walkout if the district’s usual policy is to give students a written reprimand for skipping class. Anything more than that would suggest that the school is punishing students for expressing their political views, which is a violation of their constitutional rights.

“If an unexcused absence leads to a three-day suspension, that is going to raise eyebrows,” said Ben Wizner, director of the ACLU’s Speech, Privacy, and Technology Project.

That’s not the same situation at public universities, where students can join the walkout without threat of punishment.

“The law can’t require college students to go to college,” said Wizner. “But there could be academic consequences for missing class.”

One thing to keep in mind is that students at private schools and universities do not have First Amendment protections on campus. The First Amendment prohibits only government censorship of political views and other protected forms of speech.

That’s why students at private institutions are not covered by the same protections as students in public schools. “Students at private schools don’t have the same liberties,” Wizner told me.

Teachers don’t have a right to join the national walkout

Teachers at public schools do have some free speech protections, but they’re not quite as protected as students.

Basically, teachers are expected to teach during school hours. They can attend a school board meeting and protest a proposal to arm teachers, Wizner says, but they don't necessarily have a right to protest when they’re supposed to be teaching class.

It’s reasonable for school principals to order them to stay in class during the walkout. School administrators could also ask some teachers to walk out with the students to supervise them (not to protest themselves).

But just as a school cannot ban a student’s political speech, it also cannot force students to participate in a protest. Students have the right to stay in class and keep learning if they want to, so a school cannot order everyone to join the walkout.

“It works both ways,” Wizner says.

If a teacher is asked to supervise students during the walkout, he or she must have someone in class with the students who don’t want to take part.

To punish, or not to punish

While schools have every right to discipline protesting students for unexcused absences consistent with school policy, they might see value in encouraging civic engagement or political debate among students and choose not to punish them.

That’s what happened in Missoula, Montana, when students at Hellgate High School walked out of school on February 21 in solidarity with students in Parkland.

The principal, Judson Miller, told the Missoulian that while the school could not endorse the protest, he wanted to make it a safe space for students who decided to take part in it. He said he told staff to use it as a teachable moment.

”This is a real opportunity for students to demonstrate responsibility,” he told the newspaper. “If I give you a lot of responsibility, you need to help peer monitor each other.”

Per school policy, administrators notified the parents of students who missed class.

Schools in Arizona responded more harshly to another recent walkout. Dozens of students at Ingleside Middle School, in the Phoenix area, got one-day suspensions after they left campus on February 27 to protest gun violence.

That doesn’t seem to have discouraged other students from participating in Wednesday’s protest. Students at four high schools and two middle schools in the Phoenix area have planned to join the walkout.