In addition to the attempted murder charges, Union City resident Barry Stewart was arraigned at the Fremont Hall of Justice on two counts of assault with a firearm and single counts of possession of ammunition and possession of marijuana for sale.
He is being held without bail at Santa Rita county jail in Dublin.
Stewart's charges stem from a Friday morning incident in which a 17-year-old boy suffered a nonlife-threatening gunshot wound to his lower body, police said.
Although details about the incident remained unclear Monday, it appears that Stewart mistook the victim and a 32-year-old friend for suspects in an unrelated robbery case, prosecutor Rob Warren said. After a verbal exchange, Stewart fired several shots at the teenager's car as he and his friend left, Warren said.
According to police, the victim's friend pulled out a gun and returned fire. He was not arrested because authorities believe he was acting in self-defense, police said.
Officers were dispatched to the scene but could not find the victim. About 10 minutes later, the wounded teen called police as he drove to a nearby hospital, the lieutenant said.
Police and paramedics then met with the victim near Union City Boulevard and Whipple Road and took him to the hospital. Through questioning, police were able to identify Stewart and later arrest him.