A gunman took his estranged girlfriend hostage for hours Thursday afternoon and shot her from point-blank range on a sidewalk before police killed him, authorities said.

Andrew Mike, 29, of Downey, died at the scene following a lengthy effort to negotiate with him as he sat holding the woman, who was critically injured.

The man shot the woman in the torso, prompting police sharpshooters to open fire, police said.

"He did fire at her ... the officers fired at him to try to stop that threat and be able to try to save her life," Police Chief Mark Garcia said during a news conference in the university town about 70 miles east of Los Angeles.

Officers dragged the woman, who was not moving, to an armored vehicle.

She was airlifted to Loma Linda University Medical Center and was in critical condition, spokeswoman Susan Onuma said.

The woman's name was not  were not immediately released but family members told the Redlands Daily Facts that she is Kristin Bauer, 28, of Corona, and she worked at an Office Depot store.

Mike was reported shooting a gun in a parking lot before he entered the store in search of his recently estranged girlfriend, according to a police statement.

The two argued and the man pulled a handgun and fired a shot at Bauer but missed, instead grazing a man's finger, Garcia said.

office depot bystander 325

A police officer stands with a bystander who was shot in the finger inside the Office Depot. (Rick Sforza/The Redlands Daily Facts via AP)

The bystander was listed in good condition at a hospital.

Her father, Gregory Bauer of Corona, told the Daily Facts that at one point his daughter had called him by cellphone and said Mike had tried to shoot her in the store.

"It was like background noise," Bauer said. "She kept telling him, `You gotta let me go. You gotta let me go,' and he said, `I'm not afraid to die."'

Then the phone turned off, he told the Press-Enterprise.

Mike forced his girlfriend out the back of the store at gunpoint and began walking on High Avenue where officers confronted him, according to the police statement.

He stopped and began a standoff that lasted more than two hours.

The man and the woman sat on a sidewalk. Television images showed the man holding a cellphone and a gun. At one point, he stroked the woman's hair and appeared to be talking to her.

Police managed to talk to both of them during the confrontation, which ended when the man shot the woman in the torso and police sharpshooters unleashed a volley of bullets that killed him, police said.

Bauer told the Press-Enterprise that his daughter had been dating the man for several months and there were no previous signs of trouble but she recently had suggested they stop seeing each other.

Bauer told other reporters that the man hadn't appeared to be violent and something must have "triggered" him.