MADERA, Calif. (KSEE/KGPE) – A man has been arrested following a shooting in May in the area of Berenda Elementary School in Madera, the Madera County Sheriff’s Office said on Friday.

Deputies say the Madera County Sheriff’s Communications Center received a call reporting shots fired in the area of Club Drive and Midland Way in Madera on May 25 around 6 p.m.

Upon arrival, deputies say they discovered evidence suggesting a shooting had occurred near the area of Berenda Elementary School. They also learned there was a school dance in progress at Berenda, and placed the campus on a precautionary lockdown. The school and those in attendance were searched and cleared.

The Madera County Sheriff’s Investigations Bureau took over the investigation, and they say they identified the suspect as 21-year-old Marvin Anthony Brewer of Madera.

After a follow-up investigation, detectives say they obtained a possible location where Brewer was hiding in the County of Merced. On Friday, detectives observed Brewer in a vehicle that was occupied by three other individuals. A traffic stop was initiated and Brewer was taken into custody by the Madera County Sheriff’s Detectives and members of the Madera County Narcotic Enforcement Team (MADNET).

Deputies say a subsequent search of the vehicle also recovered a short-barreled rifle that is illegal in California.

Once in custody, sheriff’s officials say Brewer attempted to flee while handcuffed but was quickly apprehended by detectives and MADNET members. Brewer was transported and booked into the Madera County Jail on suspicion of attempted homicide, assault with a deadly weapon, and discharge of a firearm.

“I would like to commend the diligent efforts of the Sheriff’s Investigations Division. They worked tirelessly throughout the night of the incident to identify those responsible and did not relent in their pursuit until a suspect was in custody. This is the type of dedication, professionalism, and competence that often goes unseen on a daily basis. Our community should rest well tonight knowing this individual is in custody,” said Sheriff Tyson Pogue.