The Los Angeles County District Attorney's Office announced the charges Friday against Dwayne Ward, 30, and Kevaughn Harris, 27.
MORE: Prayer vigil held for 3-year-old boy fatally shot in Compton
On Jan. 20, Harris was walking toward a car that was parked outside of a liquor store in the 2800 block of West Alondra Boulevard. Harris' girlfriend and her 3-year-old son Franklin were inside that car.
Ward was sitting in a nearby vehicle when he got into a verbal dispute with Harris. Both men, who belong to rival gangs, allegedly pulled out handguns and began firing at one another, the district attorney's office said.
Franklin, who was sitting in the backseat of the car, was fatally shot during the shootout. The boy's mother was not injured.
Ward was arrested on Jan. 22 after he surrendered to police. He was transported to the East Los Angeles Sheriff's Station and booked. He was being held without bail.
Wednesday, homicide detectives arrested Harris, who was booked at Century Regional Detention Center and was being held in lieu of $2 million bail.
They were each charged with one count of murder, shooting at an occupied motor vehicle and possession of a firearm by a felon. The two are expected to be arraigned on Friday. If convicted as charged, Ward and Harris face a possible maximum sentence of life in prison.
The incident remains under investigation by the Los Angeles County Sheriff's Department. If you have any relevant information about this case, you're urged to contact LASD's Homicide Bureau at (213) 890-5500. You can also submit anonymous tips by calling Crime Stoppers at (800) 222-TIPS (8477).