PHILADELPHIA (CBS) — Police say a man involved in a shootout that left Semaj O’Branty, a 10-year-old boy walking home from school, critically injured has been taken into custody. The gunman who police say shot the boy remains on the loose. The shooting happened on the 2000 block of Margaret Street in Frankford around 3:30 p.m. on Wednesday.

Police say the man in custody fired back at the shooter, who was driving a red Pontiac G6. Police say he tried to shield the 10-year-old boy.

“He tries to cover the kid and protect the kid, but the kid takes a shot and you see him go down in the video,” Philadelphia Police Capt. John Walker said.

The boy was shot in the back of the head by a stray bullet.

Police say after Semaj went down, the man in custody took cover and fired back at the suspect.

The child was transported to St. Christopher’s Hospital for Children. He is currently in critical but stable condition. Doctors say he is expected to survive.

According to police, a group of people in a Pontiac opened fire on the corner, striking the young boy.

“You see the car as it turns the corner, the back rear driver window comes down and you see an arm extend out the window and he begins to fire,” Walker said.

“I heard about anywhere from 11 to 13 shots, right in a row,” Harry Stork said. “Next thing I knew, there was a lady down the street holding the boy’s back of his head and they rushed him off to the hospital.”

Police say the boy was not the intended target.

The victim lives right around the corner from where he was shot.

Jahaira Cruz is a medical assistant and says her main goal was to keep Semaj alert until first responders arrived on scene.

“I noticed that the young man had a wound to the neck, on the left side of his neck. So I instinctively just kicked in and grabbed someone’s sweatshirt and correctly applied pressure to the area. As I was doing that, I had already started calling 911 prior,” Cruz said.

This is Semaj O’Branty, the 10-year-old hit by a stray bullet in the middle of a shootout. He was outside waiting for his mother who was inside a corner store in Frankford. He’s in critical but stable condition. Doctors believe he will survive. Live update on @CBSPhilly at 11 p.m pic.twitter.com/6o4HNuXFaa — Kimberly Davis CBS3 (@KimberlyDavisTV) November 7, 2019

Semaj is a member of Faith Assembly of God. Pastor Richard Smith says he is very involved in the church and won’t allow gun violence to take over their neighborhood.

“We just cannot allow our community to feel like hope is lost. Hope is not lost,” Smith said.

Police were able to obtain surveillance video from a corner store.

They’re still searching for a red or maroon four-door Pontiac G6. If you have any information that could help, you are urged to call police.

CBS3’s Kimberly Davis contributed to this report.