The dropping of a pencil was said to be the signal to start shooting, with some favoured students even repotedly told to wear white and shout "Eugene" as soon as the shooting began to avoid being a target.

Other students were told not to come to school at all, police said.

The boys were arrested on Thursday, the day before their alleged plan was to be carried out, after rumours reached police.

Firearms were found at both the boys' homes during searches, leading police to charge each with conspiracy to commit murder and place them in juvenile custody.

Both boys allegedly mentioned to officers during questioning the Columbine High School shooting in 1999 that left 15 dead and dozens injured.

The Sumter County Sheriff's Office said it was "grateful for those students brave enough to speak out about the plot", adding: "Their heroic actions may have prevented a deadly tragedy and loss of precious lives."

Police said information about the alleged plot first reached school officials on Tuesday as rumours circulated among students.

The 13-year-old student was intercepted by authorities as he arrived for school the following day and questioned.

"At that time, he acknowledged conversations involving the plot and referenced the mass shooting at Columbine High School," Sumter County Sheriff's Office said. "During this conversation, officials learned of a second student's potential involvement and quickly located the 14-year-old male student on campus.

"The 14-year-old student acknowledged his involvement in conversations with the 13-year-old student again referencing the Columbine shooting.

"The student informed officials that the two students had planned an attack which included what they would use as a signal to open fire."