BOX ELDER, S.D. (AP) — A South Dakota man is under arrest after authorities say he shot at a police officer and briefly took hostages at gunpoint in Box Elder.

Pennington County sheriff's authorities say Box Elder police responded Tuesday morning to a report of a man screaming. Police made contact with a man who fired a handgun at an officer who returned fire.

Authorities say the man then fled into a nearby yard and took two people hostage at gunpoint. Police closed in on the home and the suspect ran away, allowing both hostages to escape.

Officers began searching four houses, and deputies rescued a young girl from the second story of a home where the suspect was arrested.

The 31-year-old Yankton man was taken safely into custody. Charges are pending.

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.