HAWTHORNE (CBSLA) — A man who exchanged gunfire with a Hawthorne police officer after fighting with his girlfriend has been charged with trying to kill four officers who were responding to the domestic dispute call.

James Louis Boyd III, 37, of Oceanside, was charged Monday with 10 felony counts – four each of attempted murder and assault on a peace officer with a semiautomatic firearm, and one count each of shooting an occupied motor vehicle and discharging a firearm with gross negligence.

READ MORE: Man in Riverside Barricades Himself Against Police After Shooting His Wife

Boyd was fighting with his girlfriend at a hotel in Hawthorne on the morning of April 7 and reported to be chasing her when he fired shots from a rifle into the air, prosecutors said. When officers responded to the scene, Boyd allegedly shot one of the patrol cars, shattering a window, prompting at least two officers to return fire.

One officer was hit in the leg, and Boyd was also wounded, having been hit in the torso.

READ MORE: Couple Reunited With Lost GoPro Camera Thanks to Social Media

The girlfriend was not injured.

If convicted as charged, Boyd faces a possible maximum sentence of 100 years to life in state prison. He is being held on $5 million bail.

MORE NEWS: Dodgers Pay Tribute To Tommy Lasorda Before Saturday's Game

Hawthorne, a city of just under 87,000, was rocked almost immediately after the shootout by the murder of a mother outside Hawthorne Police Department’s headquarters during a custody exchange.