BERLIN, March 11 -- Residents of a small German town struggled Wednesday to decipher the motives of a teenager who burst into his former high school and went on a shooting rampage, killing 15 people before taking his own life.
Authorities said Tim Kretschmer, 17, entered the Albertville Realschule in the town of Winnenden about 9:30 a.m. Wednesday, wearing black clothes and carrying a semiautomatic pistol. They said he fatally shot 12 people there -- all but one of them female -- before leaving the school. After killing a man he encountered outside the school grounds, he commandeered a vehicle and fled to a nearby town, officials said.
Authorities said the gunman abandoned the car while trying to avoid a police checkpoint about 20 miles away. They said he ran into a nearby Volkswagen dealership, where he killed a salesman and a customer, before shooting himself as police converged on the scene. The entire episode lasted nearly three hours.
"He clearly planned this," Dieter Schneider, a regional police official, said of the assault on the school. "He wanted a bloodbath."
Firearms are tightly regulated in Germany, but the country has been afflicted by other mass school shootings in the past several years.
In 2006, an 18-year-old student carrying explosives and rifles injured dozens of people in the northwestern German town of Emsdetten before killing himself. In 2002, a 19-year-old former student fatally shot 16 people at a high school in Erfurt, in eastern Germany, before killing himself.
German Chancellor Angela Merkel called the attack in Winnenden "an appalling crime." At a news conference in Berlin, she added: "It is unimaginable that in just seconds, pupils and teachers were killed."
About 28,000 people live in Winnenden, which is outside Stuttgart in southwestern Germany.
Authorities said Kretschmer had graduated from the Albertville school last year and described him as an average student. They said they had not found a suicide note or other explanation for his actions.
Heribert Rech, the interior minister for the state of Baden Wuerttemberg, said the handgun used in the rampage was a 9 mm Beretta pistol registered to Kretschmer's father, a member of a gun club.
Rech said the gunman's father was the legal owner of 15 firearms. Police later found that 14 of them were safely locked up in the family's home, but that one had been left unsecured in a bedroom.
"I don't want to speculate too much about this," Rech said at a news conference. "But it is noteworthy that primarily girls were killed -- eight girls and one boy . . . The teachers killed were women.
Three teachers and nine students were killed inside the two-story school building, where about 1,000 students ages 10 to 16 are enrolled, authorities said.
Witnesses said students jumped from the windows of the school building after the gunman opened fire. Others hid under their desks.
"We heard some noises outside and thought there was some work being done," Muammer Gozutok, a seventh-grader, told the NTV news channel. "Then a student from the opposite class came and said someone was shooting at them. We locked the doors and hid behind tables for about half an hour."
Kretschmer fled the school and headed toward the Winnenden city center, police said. Helicopters blanketed the area as authorities tried to find him. When police caught up to him at the Volkswagen dealership, a gun battle erupted.
Two police officers were hospitalized with serious gunshot wounds but were expected to survive, officials said.