A man who wanted to "wreak havoc" in Kern County shot four people and led authorities on a wild pursuit before being shot and killed by officers on Friday.

Three people wounded in a shooting spree that stretched from a Ridgecrest home to the middle of a desert highway are likely to survive, authorities say.  

A man and a woman were found with gunshot wounds inside the trunk of the car driven by their assailant, who was later killed in a police shootout, authorities said.

A 35-mile car chase lasted for nearly an hour and ended in the middle of Highway 395, not far from Ridgecrest, when several law enforcement officers opened fire on the armed driver.

Police said the gunman attempted to shoot the couple from the driver's seat while they were in the trunk.

The two victims underwent surgery after they were airlifted to a hospital and would most likely survive, said Kern County sheriff's spokesman Ray Pruitt.

Pruitt said a third victim found earlier in the morning with multiple gunshots wounds inside a Ridgecrest home also would survive.

Authorities said the shooting spree started at 5:15 a.m. inside a home in the 500 block of West Atkins Avenue, where police officers responded to reports of gunfire.

The officers discovered two victims inside. A man, who suffered multiple gunshot wounds, was airlifted to an area hospital. The second victim, a woman, was pronounced dead at the scene. She was the city's second homicide this year.

Blood splattered on a door and the floors of the home were visible through a broken window late Friday afternoon.

The assailant called police about two hours after the house shooting, saying he wanted to kill all Ridgecrest police officers, but they had too many guns, said Kern County Sheriff Donny Youngblood.

The man said he had a package for police and was going to “wreak havoc,” Youngblood said.

Two hours later, a deputy spotted the suspect's Dodge sedan. The deputy attempted to pull the vehicle over, but the driver refused and a pursuit began.

As the man drove south on Highway 395, he fired a shotgun and handgun 10 to 12 times at oncoming traffic and forced several vehicles off the road, Youngblood said.

At one point, the suspect pulled over and the trunk opened. Officers saw the man and woman inside.

Eight miles north of Highway 58, the man pulled over again and began shooting at the backseat of the sedan and into the trunk, Youngblood said.

Seven officers with the Sheriff’s Department, Ridgecrest police and California Highway Patrol fired their weapons, killing the man, he said.

Authorities are trying to determine what led to the shootings. They have not released the names of the man or the victims.

Ridgecrest Mayor Dan Clark said the shooting shook up the desert town of just over 27,000 people in the northeast corner of Kern County.

“This is a small town,” Clark said. “And things like this just don’t happen here.”

ALSO:

Man sentenced to 5 years for swindling millions from NFL player

L.A. Supt. John Deasy says he'll talk more after his job evaluation

Boy, 13, was shot seven times by Sonoma County deputy, report finds

Twitter@katemather

kate.mather@latimes.com

Twitter: @latvives

ruben.vives@latimes.com