Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

SACRAMENTO, Calif. — One law-enforcement officer was killed and two others wounded when a gunman carrying a high-powered rifle shot through the door of his hotel room, then jumped over a balcony and led police on a brief chase.

He was captured minutes later when he crashed and was wounded by responding officers Wednesday.

Hotel guests were trapped in their rooms for most of the day as police methodically cleared the area and confirmed no other gunmen stayed behind in the hotel room.

Law enforcement officers in tactical gear arrive at the scene were suspects believed to be involved in the shooting of three law enforcement officers, Wednesday. Rich Pedroncelli / AP

Deputy Robert French, a 21-year veteran of the Sacramento County Sheriff's Department, died from a gunshot wound to his side, Sheriff Scott Jones said.

"It was an extremely dynamic, horrific series of events," Jones said.

The day began with a routine investigation by a car-theft task force involving officers from multiple agencies. Investigators suspected a car-theft ring was being run out of a Ramada Inn in an unincorporated neighborhood of Sacramento.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Two women who got into a stolen vehicle were chased for 20 miles before being apprehended in Elk Grove, south of Sacramento. Arresting officers learned they were staying at a room in the Ramada Inn.

When officers knocked on the door, a gunman opened fire through the door and walls, striking two California Highway Patrol officers before turning to the balcony, shooting French, who was outside monitoring the back door, and fleeing.

He was found with a rifle and high-capacity magazine, which are illegal to purchase in California, sheriff's Sgt. Tony Turnbull said.

The names of the wounded officers were not released. Jones said they were taken to a hospital and expected to survive.

Dozens of heavily armed officers from around the region searched the hotel for hours before determining that there were no other suspects inside.

It's unclear why the suspects responded so aggressively when police arrived, Turnbull said.

"Maybe that will come out in the investigation. Maybe we'll never know," Turnbull said. "Either way, it's irrational."

Jeff Marshall, who lives near the hotel, said he heard gunshots and then tires squealing and saw a gray Dodge speed by his home, going the wrong way down a busy street as vehicles and pedestrians scrambled to get out of the way.

"It was like the wild West," Marshall said.

The sheriff described French, 52, as a well-known, well-respected officer assigned to patrol the county's northern areas. He trained new officers and was a "go-to guy for advice and counsel, not just career advice but tactical advice and things like that," Jones said.

French is survived by his live-in girlfriend, adult children and grandchildren and a sister.

"Words aren't going to make an appropriate appreciation of him as a man or his career," Jones said.