Updated

A hostage standoff at a hospital in a small city in northeastern South Dakota ended peacefully Monday with a 10-year-old boy released and the armed man who was holding him in custody, authorities said.

The man with a weapon entered the Community Memorial Hospital Avera in Redfield with the 10-year-old child about 8:30 a.m., according to Spink County Attorney Victor Fischbach and Avera. The child was held hostage, later released and was not injured, officials said. The man was later taken into custody, Avera said.

Fischbach said the man had a loaded handgun with him at the hospital and an AK-47 assault rifle with two banana clips carrying 30 rounds each in his vehicle in the hospital parking lot.

Authorities have not disclosed the relationship between the man and the boy. The suspect was in jail, awaiting charges, Fischbach said.

Brown County Sheriff Mark Milbrandt, whose deputies were part of the special response team at the hospital, said no shots were fired and no one has been injured.

Avera said in a statement that all patients were safe and accounted for. The hospital was put on a lockdown that was lifted about 1:30 p.m.

Law enforcement was pursuing the man in a high-speed chase just before he entered the hospital with the child, Fischbach said. The suspect was rattling the door, trying to get into the hospital, when the magnetic lock was "breached," the prosecutor said.

Redfield is a city of about 2,200 about 175 miles (282 kilometers) northwest of Sioux Falls.

The Redfield hospital is a 25-bed facility with about 130 employees. Up to 40 staff members and six patients were evacuated from the hospital, the Aberdeen American News reported.