ESCONDIDO, Calif. — An officer was wounded and a suspect killed in a shootout that followed an hours-long chase across North County early Monday, authorities said.

Police first started chasing the driver Sunday evening because they believed he was responsible for a deadly shooting in Vista earlier that day, according to officials. Officers tried to pull the driver over but he took off, Escondido Police Department said, and they chased him for four hours in a winding pursuit that moved from Vista into Oceanside and then eventually Escondido.

Officials from multiple agencies tried to stop the driver, including using spike strips and armored vehicles, but eventually it was OnStar, which sent a signal to disable the car’s engine and slow it down, that ended the chase, officials said.

The car came to a stop at Mission Avenue and Gamble Street around 3 a.m. The driver got out and exchanged gunfire with at least one of the officers, according to police. More specific details on the shooting, including who fired first and exactly how many officers were involved, were not initially provided.

The man police had been chasing, later identified as 39-year-old Ramona resident Roberto Salgado, was killed.

An officer was shot in the chest but had been wearing a bulletproof vest at the time of the gun battle, officials said. He was taken to Palomar Medical Center with non-life threatening injuries.

Police said there was also a passenger in the car with the suspect who was uninjured. She was identified as a family member of Salgado’s and was taken to police headquarters to be interviewed. It wasn’t initially clear if she had been in the vehicle willingly.

Mission Avenue was closed between North Broadway and Fig Street throughout the early morning as authorities investigated.

The earlier shooting in Vista happened around 5 p.m. Sunday outside a home on Teelin Avenue and was believed to be a pre-meditated attack by Salgado, a San Diego County sheriff’s department spokesperson said.

“This wasn’t an act of random violence. It was targeted, it was intentional,” he said, referring to the victim and Salgado as “ex-family members.” The victim was later identified as 42-year-old Florencio Rodriguez.