A gunman carrying a shotgun in a guitar case opened fire at a Florida high school, wounding one student as other students and teachers piled desks and cabinets against classroom doors to make barricades.

The 19-year-old suspect was later arrested and apologized as he was led away in handcuffs.

Friday's shooting at Forest High School in Ocala happened on a day planned for a national classroom walkout to protest gun violence. A 17-year-old boy was taken to a hospital for treatment of a non-life threatening wound to his ankle.

The suspect, Sky Bouche said "sorry," followed by "It doesn't matter anyway" to reporters as he was led from the school in handcuffs by several deputies. Authorities said Bouche was a former student at the school.

"I didn't shoot anyone," he said to reporters. He ignored most of the other questions until asked what he'd say to the shooting victim. That's when he said, "sorry."

The shooting comes just over two months after a gunman killed 17 people and wounded 17 others at Marjory Stoneman Douglas High School in Parkland, Florida. Nikolas Cruz, 19, faces the death penalty if convicted in that Valentine's Day shooting.

Gerardo Mora / Getty Images

Marion County Police officers stand in front of Forest High School after a school shooting in Ocala, Florida on April 20, 2018.

Marion County Police officers stand in front of Forest High School after a school shooting in Ocala, Florida on April 20, 2018.

(Gerardo Mora / Getty Images)

It also coincided with a nationwide student walkout to protest gun violence on the anniversary of the 1999 massacre at Colorado's Columbine High School. The Ocala school had planned its version of a walkout, students said.

Chris Oliver told the Ocala Star-Banner his 16-year-old son, a Forest student, told him the shooting happened near his classroom. The boy told Oliver the shooter stood in a hallway and fired at a closed classroom door. The shooter then dropped the weapon, ran and tried to hide, the boy told his father.

Craig Ham, deputy superintendent of Ocala schools operations, said the gunman carried the shotgun in a guitar case into the school by blending in with students. Ham told reporters the shooter fired at the bottom of a locked classroom door, and pellets struck the victim in the ankle.

Jake Mailhiot's psychology class had just begun Friday morning when school officials announced a "code red" alert over the intercom.

"You could hear in their voice that this wasn't a drill," the 16-year-old junior said.

Prepared for such alerts, students and teachers leapt into action to barricade the classroom's one door and block the door's window.

"Our teachers started pushing file cabinets and desks toward the door, and a few friends and I joined in," Mailhiot said. "We also started tying together some jackets to hang out the window, in case we needed another way out."

In a photograph Mailhiot shared on social media, the classroom door is invisible behind a tall pile of furniture.

Mailhiot said about 15 people in the classroom waited over 30 minutes to be evacuated by Ocala police. They were instructed to leave with their hands up, he said.

Marion County Sheriff Billy Woods praised the quick response by the school resource officer, as well as school personnel and first responders. In the Parkland shooting, school resource officer Scot Peterson retired amid accusations he didn't do enough to confront the Stoneman Douglas gunman.

The Forest resource officer, Marion County Sheriff's Deputy James Long, "did not hesitate. He went right in," Woods said at a news conference. Woods said Long heard a "large, loud banging sound" and immediately responded.

The sheriff said the Bouche wasn't injured, wasn't fired at and was arrested without resistance.

"Marion County does everything to protect their children," Woods said.

Afterward, all students were taken by bus with a police escort to First Baptist Church of Ocala, where parents gathered to pick them up, officials said.

Rachael Carter was at the church waiting to be reunited with her daughter, a 10th-grader who turned 16 this week. Carter's pastor called her when he saw a post on social media.

"I'm shaking like a leaf in a hurricane," Carter said.

Forest High has an enrollment of more than 2,000 students, according to the National Center for Education Statistics.