PORTLAND, Ore. (AP) — A man accused of swinging a chain at a police officer and holding a woman at knifepoint has been found guilty except for insanity on several charges and sentenced to the Oregon State Hospital.

Christopher Michael Hall will serve up to 20 years under the jurisdiction of the Oregon Psychiatric Security Review Board, according to the Multnomah County District Attorney’s Office.

On Tuesday, he was found guilty except for insanity on kidnapping, unlawful use of a weapon and burglary charges, The Oregonian/OregonLive reported.

Police responded in August to a burglary call at a Portland church and found Hall harassing people, according to a probable cause affidavit. When an officer tried to arrest him, he swung a chain with a padlock at her head and narrowly missed, the affidavit said.

Hall then ran into a McDonald’s, where court documents say Hall knocked a woman to the ground, held her at knifepoint, then used her as a shield when officers drew their guns. Police tried to negotiate but he moved away with the woman, dropped the knife and ran, the affidavit said.

A bystander tackled him outside the McDonald’s.

Hall, 39, was also found guilty except for insanity of burglary charges in three other August incidents, according to the agency.