SACRAMENTO (Reuters) - A man with a high-powered rifle fatally shot a policeman at a hotel in Sacramento, California, on Wednesday and wounded two other officers who were searching for a suspected car thief, officials said.

California Highway Patrol officers had knocked on the door of a room in a Ramada Inn when someone inside fired through the door and walls, wounding two of them, Sacramento County Sheriff’s Department spokesman Tony Turnbull told reporters.

Deputy Sheriff Robert French, a 52-year-old grandfather, was shot when the gunman exchanged fire with police from a rear balcony, and he died as he was being rushed to a hospital, Sacramento Sheriff Scott Jones told reporters.

The two Highway Patrol officers were hospitalized in stable condition.

After exchanging gunfire with officers, the suspect got into a car and drove away from the hotel with police in pursuit, Turnbull said.

He later crashed the car and again exchanged fire with police before he was struck by gunfire and arrested, Turnbull said. Police did not identify him, but they said he was hospitalized in critical condition.

Heavily armed enforcement officers converged on the Ramada Inn, as they sought to determine whether any other suspects were inside the room where the gunfire broke out, but none were found.

Two women suspected of involvement in the car theft were arrested after a separate vehicle chase before the shootout at the hotel, Turnbull said.

California Governor Jerry Brown in a statement said he and his wife joined “all of Sacramento in grieving the loss of Deputy French, who died today while protecting our community.”