After being tipped off by students, California officials acted to foil a shooting plot involving a high school last week.

Authorities say that four northern California students were arrested on Friday for plotting to carry out a shooting at the Summerville High School in Tuolumne, a small town about 55 miles east of Stockton. Once in custody, the students confessed to planning to shoot and kill faculty members and students.

"The suspects plan was very detailed in nature and included names of would be victims, locations and the methods in which the plan was to be carried out," the sheriff's department said in a Facebook post, according to Reuters.

During a news conference on Saturday, Tuolumne County Sheriff James Mele did not name the juvenile suspects, but he identified them as male.

Mele added that the students' plan to "come on campus and shoot and kill as many people as possible" was discovered after other students at Summerville overheard the suspects discussing it on Wednesday. Once they reported the threat to school staff, administrators contacted the sheriff's office.

Deputies also said the suspects confessed to compiling a list of names of targeted victims, which they have brought into evidence, reports USA Today.

According to Mele, the "common denominator" of possible victims was their affiliation with Summerville reports NBC News.

The sheriff added that the four suspects were in the process of obtaining weapons and had gotten "pretty doggone close" to launching the attack.

"I have no idea why somebody or a group of individuals would want to do this," Mele said. "Cyber-bullying is a problem in our society."

"I think children today have a hard time trying to understand what is reality and what is fiction," he added.

The four students are now facing conspiracy to commit an assault with deadly weapons.