Four teenagers were trapped by a gunman inside a Hudson house Saturday, hiding in a closet while multiple shots were fired, then escaping to safety out a basement window, police said.

A 43-year-old gunman was shot and critically wounded by sheriff's deputies, after firing at police at the end of a seven-hour standoff, officials said. None of the teenagers nor the police were wounded, although the gunman fired perhaps two-dozen shots during the incident.

The St. Croix County Sheriff's Department identified the shooter as Daniel Christenson, 43, whose house is directly behind Hudson High School. Police said Christenson had been in an argument Saturday night with his son, Zachary, 19, when the father pulled out a pistol and began firing.

The son called 911, while three of his visiting friends — one girl and two boys, ages 13 to 15 — hid in the basement. All four escaped after about 30 minutes, police said.