PARKLAND, Fla. — Students across the country — from middle school to college — walked out of class Wednesday, calling on state and federal legislators to enact stricter gun laws one month after the mass shooting at Florida’s Marjory Stoneman Douglas High School.

Seventeen students and staff members were killed at the school in Parkland on Feb. 14. On Wednesday, students at hundreds of schools across the nation left class at 10 a.m. local time for 17 minutes — one minute for each victim.

At Marjory Stoneman Douglas, two walkouts took place. Citing safety concerns, student government officials and administrators urged students not to leave campus, but to walk to the football field with teachers. Some students balked at the idea of a chaperoned walkout, saying they wanted to get off campus and spread their message to the broader public.

As students made their way to the football field, past a sculpture of the school Eagle mascot, they walked hand in hand or with their arms around each other. Only a few carried placards. There were no chants. Helicopters buzzed overhead.

David Hogg, 17, one of several students at the school who has gained national prominence for advocating gun control, livestreamed the walkout on his YouTube channel.

“We have to stand up now and take action,” Hogg said. He interviewed several of his classmates.

“This is about the need for change,” another student told Hogg. “Yes, the prayers from politicians are nice, but we need real change.”

Organized by the youth branch of the Women’s March, called Empower, the National School Walkout is urging Congress to take meaningful action on gun violence and pass federal legislation that would ban assault weapons and require universal background checks for gun sales.

Students from New York to Seattle marched on school athletic tracks or staged sit-ins along busy streets.

In Massachusetts and Ohio, students headed to their statehouses to lobby for new gun regulations. In Washington, D.C., hundreds of students gathered outside the White House, holding signs and marching quietly.

“No more silence, end gun violence,” read one sign. Another said, “History has its eyes on you.”

In Maryland, students at Baltimore Polytechnic Institute poured out the back doors of the school and onto the football field. Many of them lay down on the football field. Hundreds of Baltimore students left school to march to City Hall.

In Illinois, high school students from Barrington to Plainfield to Naperville to Chicago worked with peers and school administrators and prepared signs and speeches in preparation for the mobile protest.

With walkouts planned across the country — at elementary schools, high schools and universities — organizers published a “tool kit” online that offered students tips on how to organize, get support from parents and guardians and share information on social media.

Earlier this week, Robert W. Runcie, superintendent of Broward County schools in Florida, notified parents he had instructed staff not to interfere with peaceful student-led protests.

“Such occasions are teachable moments, during which students can demonstrate their First Amendment right to be heard,” Runcie wrote in a letter to parents. “In the event students walk out or gather, school principals and assigned staff will remain with students in a designated walkout area, so that supervision is in place.”

Over the last month, students across Florida and the nation have staged spontaneous walkouts, with some leading to disciplinary action. Two weeks after the Parkland shooting, dozens of students at Ingleside Middle School in the Phoenix area were given one-day suspensions after they walked off campus.

In Needville, Texas, 20 miles southwest of Houston, Superintendent Curtis Rhodes warned students that anyone who left class would be suspended for three days, even if they had permission from their parents.

“Life is all about choices and every choice has a consequence whether it be positive or negative,” Rhodes wrote in a letter to parents posted on social media. “We will discipline no matter if it is one, fifty, or five hundred students involved.”

On Wednesday, the American Civil Liberties Union issued advice for students who walk out, saying schools can’t legally punish them more harshly because of the political nature of their message. In Pennsylvania, Wisconsin and Texas, some lawyers said they would provide free legal help to students who are punished.

Back in Parkland, school officials at Stoneman Douglas urged students not to leave campus.

“We’re just trying to protect the students,” said Jaclyn Corin, 17, the high school’s junior class president. “We’re telling everyone not to leave campus, but we can’t stop them.”

Hogg said he worried students would be “a group of soft targets” if they left campus.

But some students, like 17-year-old junior Susana Matta Valdivieso, felt compelled to take the protest beyond school grounds.

When the first bell rang Wednesday, Valdivieso was not sitting in Spanish class as usual. Instead, she was hauling a stack of handwritten placards across a community park. Dozens of her classmates joined her at nearby Pine Trails Park.

Valdivieso offered a message to politicians watching the student walkouts, not just in Parkland, but around the country as well.

“We won’t give up, we’re a whole bunch of high schoolers,” many of whom “will all be eligible to vote,” Valdivieso said.

“And we will vote every single one of you out until our country is in good hands,” she said to cheers.

The Parkland students’ protests in recent weeks have seen some results.

Last week, Florida Gov. Rick Scott, in a rebuke of the National Rifle Association, signed into law a measure that, among other things, raises the minimum age to purchase a firearm in the state from 18 to 21 and bans the sale or possession of “bump stocks,” which allow semiautomatic rifles to mimic machine guns.

The walkouts Wednesday are among several protests planned for coming weeks. The March for Our Lives rally for school safety is expected to draw hundreds of thousands to the nation’s capital on March 24, its organizers say. And another round of school walkouts is planned for April 20, the 19th anniversary of the Columbine High School shooting in Colorado.