Authorities averted a potential shooting at a middle school in Lee County, Florida, after arresting two students who were allegedly plotting an attack.

Lee County Sheriff Carmine Marceno said the 13- and 14-year-old boys were charged with conspiracy to commit a mass shooting after a sheriff’s department investigation this week found they were devising a plan and "extensively studying" the 1999 Columbine High School shooting, when two students killed 12 others and a teacher.

"This could’ve turned disastrous. We are one second away from a Columbine here," Mr. Marceno said during a press conference Thursday.

A teacher at Harns Marsh Middle School in Lehigh Acres, just east of Fort Myers, alerted administrators and the school resource officer Wednesday after students warned that an eighth-grade student might be carrying a gun in his backpack, officials said. Students were removed from the classroom, and an administrative search uncovered a map of the school with marks indicating the locations of interior cameras but didn’t reveal a firearm, Mr. Marceno said.

CLICK HERE TO GET THE FOX NEWS APP

Detectives identified another student who was allegedly involved. The investigators uncovered weapons at the boys’ homes, including a gun and knives, and evidence that they were trying to learn how to make pipe bombs and purchase guns on the black market, authorities said.

"In this case, I’m certain that my team of dedicated deputies and detectives acted promptly, investigated thoroughly and prevented a very violent and dangerous act from being carried out," Mr. Marceno said. 

"This could’ve been the next Parkland massacre," he added, referring to the 2018 shooting at Marjory Stoneman Douglas High School over 120 miles away in Parkland, Fla., that killed 17 people. "But we stopped them in the planning stages."

The teenagers both meet criteria for evaluations at a mental health facility, Mr. Marceno said. The sheriff’s department was familiar with the boys already, he said, and had responded to calls at their homes nearly 80 times altogether.

At the press conference Thursday, Lee County Superintendent Ken Savage thanked students, educators, school staff and the resource officer for responding quickly to the potential threat. A spokesperson for the school district declined to comment further on Friday.

"All the threat-assessment and emergency-response training made a difference in the outcome of this incident," Dr. Savage said.

To read more from The Wall Street Journal, click here.