ANGELS CAMP, Calif. (AP) — A mechanical failure caused the collapse of a spinning-chair ride at a county fair that injured all 23 aboard, mostly children, according to an initial investigation by state inspectors.

All of the victims but two had been released from hospitals by Saturday, a day after the ride broke down. A 12-year-old girl was hospitalized in good condition and a 14-year-old girl was listed in stable condition, according to sheriff's Sgt. Dave Seawell. The sheriff's office initially said 24 people were injured but revised the number on Saturday.

The Yo-Yo ride has a series of metal arms extending from a rotating hub. A chair is attached to the end of each arm by long chains, and the arms and chairs swing outward as the hub rotates and picks up speed.

People who witnessed the accident at the Calaveras County Fair said they saw the ride's arms and chairs suddenly collapse, dragging the passengers on the ground until the machine came to a halt.