Alfonso Martinez, 20, faces attempted homicide and other charges at a court appearance Thursday afternoon.

Story highlights

Alfonso Martinez, 20, arrested after 7-month manhunt

Police use stun gun on suspect, who tried to escape in car

Martinez allegedly followed, shot two boys after dispute

Teen lost an eye and hearing in one ear, needed brain surgery

CNN  — 

A man who allegedly shot a 15-year-old boy and his 12-year-old cousin last summer following a neighborhood dispute over a dog has been arrested in Stockton, California, after a 7-month manhunt, police said.

A task force of U.S. Marshals and Stockton police closed in on Alfonso Martinez, 20, Wednesday afternoon as he got into his car outside a Stockton apartment complex. He allegedly tried to back the car into the officers, but hit a pole after police rammed the vehicle with an unmarked car. After hitting a pole, Martinez fought with police, who “legally subdued” him with a stun gun, Stockton police spokesman Joe Silva said.

Police later found a loaded 9 mm handgun gun inside the car, Silva added.

Martinez was being sought in connection with several shootings, including the July 12 shooting that partially blinded and deafened the 15-year-old. The 12-year-old was shot in the leg.

“Praise Jesus!” said Demetria Carruthers, the grandmother of the older boy who was shot. “Now my family can sleep.”

Dookie, left, was persuaded by mother Kimberly Snowden and grandmother Demetria Carruthers to tell his story to CNN .

The boy, now 16, told his story to CNN Digital as part of a project that looked at every shooting that took place across the United States on July 12. Because he is under 18 and his shooter was still at large when the original story was published, CNN agreed to identify him only by his childhood nickname, Dookie.

The CNN Guns Project: One Day of Violence

Dookie, who lost an eye, underwent brain surgery and has been recovering at home. He hopes to return to school in January.

He wants to see the man who shot him convicted and sent to prison.

“I want him gone,” he told CNN in September.

That process begins Friday afternoon, when Martinez is due in court to face charges of attempted murder, assaulting a police officer with a deadly weapon and drug offenses. He is being held without bail in the San Joaquin County jail.

Dookie told CNN he never saw the bullets coming. He said he received a call asking him to back up his friends in a fight. They’d been having trouble with Martinez, who lived with a girlfriend near his cousins, Dookie said.

Dookie had gone back to retrieve a gold chain broken in the scuffle when a light-colored sedan began to follow him and a cousin down the street. About a dozen shots were fired at the boys from a handgun inside the car.

Dookie was airlifted to the UC Davis Medical Center, where he underwent surgery to remove a section of his skull and relieve the pressure on his brain. He spent a week in a medically induced coma.

Within a day or two of the shooting, police found surveillance camera video of one of the neighborhood fights and used social media to post an image of the man involved. That led investigators to a clearer photo and a name.

Police initially believed Martinez had fled to Mexico or was hiding out in Reno, Nevada. Martinez also was being sought on a warrant for a drug charge.