A 17-year-old gunman dressed in black opened fire at his former high school in southwestern Germany on Wednesday, killing at least 15 people before police shot him to death, state officials said.

Nine students and three teachers were among the dead, State Interior Minister Heribert Rech said.

Baden Wuerttemburg governor Guenther Oettinger said police shot the suspect after he fled the school.

Helicopters searching for him crisscrossed the area, and police warned area residents not to pick anyone up in their cars. It was Germany’s worst shooting since another teenage gunman killed 16 people and himself in another high school in 2002.

Police said the former student at the school in Winnenden, about 12 miles (20 kilometers) northeast of Stuttgart, entered it at 9:30 a.m. and opened fire, shooting at random.  About 1,000 children attend the school

Witnesses said students jumped from the windows of the school building after the gunman opened fire. Concerned parents quickly swarmed around the school, which was evacuated during the incident.

"He went into the school with a weapon and carried out a bloodbath," said regional police chief Erwin Hetger. "I’ve never seen anything like this in my life."

After the attack, the suspect fled the Albertville high school toward the center of Winnenden, a town of 28,000, Hinderer said. The teenager graduated from the school last year, police said.

In 2002, 19-year-old Robert Steinhaeuser shot and killed 12 teachers, a secretary, two students and a police officer before turning his gun on himself in the Gutenberg high school in Erfurt.

Steinhaeuser, who had been expelled for forging a doctor’s note, was a gun club member licensed to own weapons. The attack led Germany to raise the age for owning recreational firearms from 18 to 21.