Los Angeles police said Friday they were investigating an incident from a day earlier in which an 8-year-old boy brought a gun to his charter school site in Pacoima.

But a top school official said the third-grade student at Vaughn Next Century Learning Center’s Green Global Generation Academy (G3) campus did not intend to harm anyone. He merely showed off the gun to several students and told them not to tell anyone he had brought it.

LAPD Foothill Division officers received a radio call at 10:55 a.m. Thursday reporting that a child brought a gun to the charter school campus in the 11000 block of Herrick Avenue, according to LAPD Officer Christopher No and school officials.

No said the gun had been secured with a locking mechanism before the child brought it to school.

“There was no way of it being fired or discharged in any way,” he said.

Officers took the child temporarily into custody and retrieved the gun, which was registered to the boy’s uncle, No said.

Anita Zepeda, executive director of Vaughn Next Century Learning Center – an independent charter school which includes 5 campuses – said the student brought the weapon and shared it with some peers in the yard before class started. About 500 second and third-grade students are enrolled on this campus.

According to the boy’s peers, “he stated that he was showing them what the real gun looked like from the video game ‘Call of Duty’ — and then told them ‘you better not tell,’” Zepeda said.

“It was the intent of a curious child bringing something to share,” Zepeda said.

The boy had the gun in his backpack, which was found after one of his peers told their teacher. The class was evacuated from the area and police were immediately called, Zepeda added.

The Los Angeles County Department of Children and Family Services got involved and ultimately the boy was released to the care of his parents, No said. He was not arrested because of his age.

It was not immediately clear how the boy obtained the gun.

The Los Angeles City Attorney’s office is expected to review a potential child endangerment case involving the uncle, No said.

A letter to parents sent home Thursday from G3 campus director Anarosa F. Estevez said school administrators and police “took immediate action” after a student reported seeing the weapon.

“Rest assured that your child was safe at all times,” the letter stated.

Estevez asked parents to check their children’s backpacks before coming to school and to remind them to tell an adult if they see anything unusual.

The letter also urged parents to monitor the video or online games their child is playing.

“We wouldn’t have been dealing with this if that weapon wasn’t accessible to that child, and (children) are not emulating these behaviors to show off with these peers,” Zepeda said.

In addition to the letter that was given to each student, school administrators met with the parents of up to four students who had seen the gun, according to Zepeda.

Flor Chavez, who said her younger sister attends the school, said via a direct message on Facebook she wished family members had been notified “right away” that a gun was brought to campus.

“We should have the choice to let them stay in school that day or not,” she said.