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.

A 17-year-old Conemaugh Township youth and a 16-year-old Upper Yoder Township youth were charged 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.

READ MORE: NBA At 75: Former 76er Dr. J Says Players From Many Eras Built League

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.

READ MORE: Sharon Hill Police Officers Charged With Manslaughter In Fatal Shooting Of 8-Year-Old Fanta Bility

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.”

MORE NEWS: Police Searching For Older Model Cadillac In Connection To Murder Of Pregnant Woman Last November

© Copyright 2021 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.