A gunman with an assault rifle shot and killed a California sheriff's deputy and wounded two other officers at a Sacramento hotel.
Police believe a stolen vehicle ring was being run out of the hotel, which was later surrounded by officers searching for suspects.
The Sacramento County Sheriff's Department's vehicle theft task force was investigating the ring on Wednesday when officers engaged in a 20-mile car chase that began at the hotel.
The police say they learned while arresting the two women in the suspected stolen car that one had a room at the hotel.
Officials say the shooting began when officers returned to the room and knocked on the door to investigate.
T hey were hit with gunfire coming from inside the room, and a man inside then left through the back, where he shot Robert French and fled in a vehicle.
After a short pursuit, police exchanged fire with the man, who was hit, sheriff's spokesman Tony Turnbull said.
Jeff Marshall, who lives near the hotel, said he heard gunshots and then tyres squealing and saw a grey Dodge Charger speed by his home, going the wrong way down a busy street.
He estimated he heard 12 shots, and said: "It was like the Wild West."
The man suspected of killing the deputy is in custody, but officers believed other suspects may still have been holed up in a room where the shots were fired.
Guests at the hotel were told to shelter in place.
After an hours-long search police said no other suspects were found at the hotel.
Mr French, a 21-year veteran of the Sacramento County Sheriff's Department, died on the way to a hospital from a gunshot wound to his side, Sheriff Scott Jones said.
The 52-year-old is survived by a girlfriend and several adult children, Mr Jones said.
The two wounded California Highway Patrol officers were expected to survive.