JOHNSTOWN, Pa, (AP) — Authorities say they believe two teenagers arrested on conspiracy and other charges after a trespassing incident at a western Pennsylvania high school may have been planning a shooting at the school.

 Logan Pringle, 17, of Conemaugh Township and Preston Hinebaugh, 16, of Upper Yoder Township, were charged as adults in Cambria County with conspiracy to commit terrorism and aggravated assault, District Attorney Greg Neugebauer said. The older teen is also charged with attempted aggravated assault and the younger with conspiracy to commit criminal trespass and a firearms count, he said.

Chief Donald Hess of the Upper Yoder Township police department said five weapons were seized at the home of the younger teen — one pump-action rifle and four AR-15-style semi-automatic rifles that were untraceable “ghost guns” not made by a manufacturer and without serial numbers.

Authorities allege that the younger teen, a Westmont Hilltop high school student, allowed the older teen, a former student, into the building Tuesday. The older teen had been barred from the school by a court order after an alleged prior threat “to shoot up” the high school, Hess said. The younger teen is accused of having posted a picture of him inside with what Hess described as a “kind of ominous-like” message about his return.

A concerned parent reported that the older teen had been at the school, and law enforcement was contacted Wednesday and began an investigation.

Hess told reporters that “everybody involved in this investigation strongly believes that the individuals were in the planning phases of a school shooting.”

“We do not believe that students and staff were in any imminent or immediate danger at any point over the last several days,” Neugebauer said. “But we do believe that quick action by the school district and law enforcement prevented a tragedy.”

Officials declined to discuss a possible motive. Prosecutors said local and Johnstown police, county detectives, and federal officials from Homeland Security, the FBI, the U.S. Attorney’s office and the bureau of Alcohol, Tobacco, Firearms and Explosives were involved in the investigation.

“Recent events, including this one, must serve as a reminder that we all should remain alert to protect ourselves and those around us,” Neugebauer said in a press release. “All threats to the safety of our schools and institutions will be thoroughly and swiftly investigated, and all incidents will be taken seriously.”

Both Pringle and Hinebaugh were taken into custody without incident and are currently lodged in Cambria County Prison awaiting preliminary arraignment with bail set at $250,000. The teens tried to have their bail reduced on Wednesday Dec. 22 but the judge denied it.

Get daily updates on local news, weather and sports by signing up for the WTAJ Newsletter