A school police officer has been hailed a hero after he ran towards the 19-year-old alleged gunman during a Florida school shooting.

Deputy James Long, a resource officer for Forest High School in Oscala, heard the gunshots Friday and immediately ran towards the source.

Within three minutes, the officer was able to arrest suspected gunman Sky Bouche after he opened fire in the school.

Bouche was only able to wound one person after he shot through a classroom door and pellets hit a 17-year-old student in the ankle. The student was taken to the hospital with a non-threatening gunshot wound.

Marion County Sheriff Billy Woods praised the deputy for his response. Long 'did not hesitate. He went right in,' he said during a news conference Friday.

Deputy James Long, a resource officer for Forest High School in Oscala, has been hailed a hero after he arrested suspected shooter Sky Bouche three minutes after he opened fire

Bouche was taken away from the school in a hazmat suit to preserve the evidence on his body

The shooting took place at Forest High School (pictured) in Ocala, Florida, on Friday morning. It was the 19th anniversary of the Columbine High School massacre in Colorado

Long heard a loud bang at 8:39am on Friday and immediately rushed towards the sound, Marion County Sheriff Billy Woods said.

By 8:42am, just three minutes later, Long was at the hallway where the shots were fired and took the shooter into custody.

The gunman, whose attempted massacre coincided with the anniversary of the 1999 Columbine shooting, was led away from the school by police in a white hazmat suit to preserve any evidence on his body.

He apologized to reporters after he was being taken away in cuffs.

'I just shot through the door. Sorry, it doesn't matter anyway,' he said on his way to a patrol car.

Bouche, who was a former student at the high school, did not reveal the motive for the shooting. He is now at Marion County jail.

Bouche, the alleged shooter, apologized to reporters Friday saying 'sorry, it doesn't matter anyway'. He is being held in Marion County jail

In this April 20, 2018, photo by Jake Mailhiot, desks, chairs and filing cabinets are used to barricade a classroom door during the shooting that injured one on Friday morning

Hands up! Students were told to put their hands up as police swept through classrooms

Authorities said the suspected gunman carried his weapon in a guitar case when he entered the school Friday.

The sheriff also clarified that the suspect was not harmed when he was taken into custody and that he was arrested without resistance.

'Marion County does everything to protect their children,' he said.

The school, along with others in the district, were planning a walkout to protest gun violence. But it was cancelled after the school went into lockdown following the shooting.

The student who was shot remains unidentified, but he told the county's chief deputy he was 'so glad it was me and not one of my friends'.

The suspected gunman did not reveal a motive for the shooting that sent a 17-year-old male to the hospital

Emotions ran high as students walked hand-in-hand outside their school on Friday to be united with parents and teachers who were waiting

Students and teachers are pictured hugging in front of Forest High School after Friday morning's shooting

One chilling photo revealed the panic that ensued inside the Florida high school after it went on a 'Code Red' alert during the shooting.

The photo, posted on Snapchat, shows a barricade of desks, chairs and other furniture in front of a classroom door to prevent the shooter from entering.

Video footage also revealed police officers sweeping classrooms looking for the gunman and yelling for students to put their hands up.

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

The Friday shooting comes just nine weeks after 19-year-old Nikolas Cruz opened fire inside Marjory Stoneman Douglas High School in Parkland, Florida, killing 17 people.