PORTLAND, Maine — A middle school student reportedly armed with a handgun was taken into custody Friday afternoon in Portland, according to authorities.

Due to the report, the campuses of three Portland schools — Deering High School, Lincoln Middle School and Longfellow Elementary School — entered temporary lockdowns, Portland Police Interim Chief Vern Malloch said.

Police said they responded to the high school at about noon. They said the person who was reportedly armed was taken into custody at 1 p.m.

No further threat was apparent and no threat was made against Deering High School, police said, and the area was deemed safe.

Deering High School students had already been dismissed at 11:15 a.m., a school official said, so the safety measure was limited to any stragglers or staff who hadn't yet left the building or campus area. Police said it was the last day of school and most student had left prior to the lockdown.

Police said Longfellow staff were approached by a student around noon reporting that another student just minutes earlier outside the school "had lifted his shirt and revealed a handgun tucked in his waist," and that he "made threats to use the gun on others."

In a voicemail to parents at about 2 p.m., a Longfellow Elementary School official said that about 30 minutes after students' dismissal, officials were informed that a "non-Longfellow student showed a weapon to several non-Longfellow students down by the basketball court behind Longfellow School."

The suspect was identified as a 13-year-old student of Lincoln Middle School. Police said he was found shortly after 1 p.m. in nearby Evergreen Cemetery and taken into police custody. They said a realistic looking pellet gun was found in the area, believed to be the weapon that was displayed.

The boy was charged with criminal threatening and terrorizing, and was released to the custody of his parents.

Police said the county district attorney's office would review the case.

"We are fortunate that students acted responsibly by alerting staff to this threat quickly," Chief Malloch said. "They were able to provide critical details that ultimately led to a safe resolution."