Long Beach police surrounded an area near Washington Middle School on Monday and eventually arrested a man on suspicion of attempted murder after someone heard gunshots.

The gunfire rang out around 3:50 p.m. near W. 15th Street and Chestnut Avenue, police said.

“Upon arrival, officers set up a perimeter to search for the suspect,” LBPD spokeswoman Shaunna Dandoy said.

They detained three people before arresting one of them for allegedly firing the shots, Dandoy said.

Officers were not able to find whoever was targeted by the gunfire, but they nevertheless arrested the alleged gunman on suspicion of attempted murder and shooting a gun in a school zone “based on the totality of the evidence,” Dandoy said.

Police identified the suspect as Luis Hernandez, an 18-year-old resident of Long Beach, who was held on $1 million bail.

The other two people detained were released, Dandoy said.

Jeremiah Dobruck is managing editor of the Long Beach Post. Reach him at jeremiah@lbpost.com or @jeremiahdobruck on Twitter.