A teacher and all 20 students taken hostage by a student armed with a handgun at a Wisconsin school have been released unharmed after an hours-long ordeal, an official said.

"The incident has been resolved," said Eric Burmeister, the director of emergency management in Marinette, Wisconsin. "All 20 students have been released unharmed. Students are now being reunited with their families."

Burmeister was unsure whether the student gunman was in custody. Reports claimed he had taken his life.

The student, who was not identified, entered the classroom at the end of the school day, local media reported.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.