GLADSTONE, Ore. (AP) — A 46-year-old Oregon man who shot a police officer and held a woman hostage for two hours before being shot by a member of a SWAT team has been sentenced to 30 years in prison.

Jeffrey Giddings apologized to the Subway restaurant worker he took hostage in a southern Portland suburb but directed an expletive at police before receiving the sentence Friday.

Giddings pleaded guilty to attempted murder, first-degree kidnapping, first-degree criminal mischief, coercion, unlawful use of a weapon, felon in possession of a firearm and possession of methamphetamine.

Authorities say Giddings in August fired 15 times at Lee Jundt, a Gladstone police officer who was in his patrol car.

Jundt was struck at least once in the arm, and the injury ended his police career in Gladstone.