(CNN) -- A 15-year-old northeast Wisconsin high school student held 24 hostages for about five hours Monday, then turned one of his guns on himself when police broke in at the sound of gun shots.
All of the hostages -- 23 students and one female teacher -- walked away shaken but unharmed, Marinette Police Chief Jeff Skorik told reporters.
The hostage-taker was treated by emergency medical personnel at the scene, then transported to Bay Area Medical Center in Marinette, Wisconsin. Skorik said he did not know the boy's condition as of 9:45 p.m. Monday.
The hostages' release capped a perilous afternoon and evening in Marinette, a town of about 11,600 residents bordering Lake Michigan.
The male student, who had a .22-caliber semi-automatic and a 9-millimeter semi-automatic, took over his first-floor classroom about 3 p.m. Monday, as classes were ending at Marinette High School, said Skorik. He prevented anyone from leaving the room and would only communicate with police via the teacher, Skorik said.
The hostages later told police that he fired one or more of the guns.
Marinette High School Principal Corry Lambie called police at 3:48 p.m. Monday to report that an armed student had gone into a classroom and taken those inside hostage. Most students had left for the day.
Bradley Behrendt, a city council member, said that he was two blocks from the school when about 15 police squad cars arrived. Law enforcement officers from all around Wisconsin, and some from as far away as Michigan, eventually joined the effort.
"They were just going like crazy," Behrendt said of the police response.
Authorities set up a post inside the school, but the suspect refused to talk to them.
At around 7:40 p.m., the suspect agreed to release five hostages after they asked to use the bathroom, according to Skorik.
At 8:03 p.m., police positioned outside the classroom heard three gunshots fired and went inside the room. They confronted the suspect, who then fired one shot at himself. Skorik did not divulge where the suspect was wounded or how badly.
The remaining 19 hostages, including the teacher, then were put on a bus and brought to an area where they could be reunited with family members.
Authorities later determined that the young male had fired from both of his weapons. Police said they do not know the suspect's motive.
"There were no specific reasons for this incident to take place," said Skorik.
The student had no previous run-ins with the law, according to the chief. He added that the Marinette County district attorney will review the incident tomorrow, and possibly press charges.
Several hundred residents gathered about a half-mile from the school as the event unfolded, said Behrendt.
Marinette High School will be closed Tuesday, said Superintendent Tim Baneck. School officials are working to make grief and other counselors available to students and others affected by the incident.
"It's terrible what he's doing. There's no reason for it," high school student Calsey Krause told CNN affiliate WBAY prior to the hostages' release. "There's no reason to bring a gun to school. It's ridiculous."