HERCULES -- A 19-year-old man was arrested by police Wednesday after he was caught walking around with a BB gun on the Hercules Middle School campus.

The Hercules Police Department's school resource officer was contacted about 9:15 a.m. by a student at the middle school who said she had seen a man come on the campus with a gun in his pocket.

The student said she first saw the man on the bus on her way to school. He was sitting in front of her and she saw him take a black handgun out if his right front jacket pocket and put it in his right front jeans pocket, she added.

She said she last saw the man inside the school campus by the administration gate.

The officer went to the gate and found the man the student described.

Police said the officer recognized the man as former student Brandon White and knew he was not authorized to be on the Refugio Valley Drive campus during school hours.

According to police reports, the officer drew her gun and ordered the man to lie facedown on the ground, where she handcuffed him. As the officer reached down to check his right front pocket, the man admitted he was carrying a BB gun, police said.

The officer found a black Walther CP99 Compact Semi-Auto BB Gun with its safety in "fire mode," but there was no canister or pellets in the gun. The suspect did not have ammunition on him when he was searched, police said.

White, a Richmond resident, was arrested on a charge of possessing and bringing a weapon on school grounds. He was transported to the Martinez Detention Facility, where he was being held on $10,000 bail.

Contact Katie Nelson at 925-945-4780 or follow her at Twitter.com/katienelson210.