WINNENDEN, Germany (CNN) -- A gunman dressed in military gear killed 15 people Wednesday in a shooting spree in Germany, police said.
German shooter Tim Kretschmer, 17, targeted females during his rampage.
Tim Kretschmer, 17, began his rampage at a school where he used to be a student in Winnenden, a small town about 20 kilometers (12 miles) northeast of Stuttgart.
Most of the victims at the school were female -- eight female students, three female teachers and one male student, said Heribert Rech, interior minister for Baden Wuerttemberg region.
Rech said: "They were completely taken by surprise. Some of the victims still had their pens in their hands."
Kretschmer opened fire in three first floor classrooms, including a physics lab where a teacher was found dead behind her desk, Rech told a news conference.
Rech said police arrived in minutes. "This speedy intervention means they prevented further escalation of events."
The shooting at the Albertville-Realschule Winnenden school began around 9:45 a.m. (0845 GMT) and lasted about two minutes.
Student Louis Schweizer was in class when he heard the gunshots. "When I came out, I saw the shell casings lying around everywhere," he said.
His sister, Lisa Schweizer, also heard the shots. "It is a tragedy," she said. "One of my teachers was killed."
Another student told CNN: "We heard that someone was inside shooting. Then we also saw a teacher who had blood on his hands because he wanted to help a female teacher who sacrificed herself for a student -- she stood in front of a student to protect her." Read how students jumped from windows to escape
Fifteen-year-old Natta lost a long-time friend. "She was a very good friend of mine from soccer, and I knew her since we were four years old and it's very hard," she said.
Kretschmer did not shoot wildly, Rech said, contradicting earlier police statements, but hit most of his victims in the head.
As the first police arrived at the school, he fled and killed a person working in a hospital nearby, then hijacked a car, taking the driver hostage.
He drove towards the nearby town of Wendlingen, but the car crashed on a sharp bend, Rech said.
The driver escaped and called police as Kretschmer ran away and towards a car salesroom in Wendlingen where he shot a salesperson and a customer, Rech said. Watch the gunman's deadly route »
"Police officers in civilian clothes opened fire and shot several times. The perpetrator tried to escape and was shot at least once in the leg. ... A little later he was found dead," he added.
It was not clear if he died from injuries received in the police shootout or if he committed suicide. Regional police chief Erwin Hetger said police thought he had killed himself.
Kretschmer was on the loose for three and a half hours after the incident began, police said. Watch more about the shootings »
German Chancellor Angela Merkel said it was "inconceivable that within seconds school students and teachers have been put to death by this terrible crime."
"It is a day of mourning for the whole of Germany," she said in a televised statement.
Police did not know the motive for the shooting spree, CNN's Frederik Pleitgen reported from Winnenden.
"No one seems to have an explanation for why this happened," he said. "Police officers have heard that this young man didn't cause much of a buzz, wasn't someone who was negative or known for violence. They have no idea why he did all this."
Police raided his parents' home later and found they had a collection of 14 guns.
The pistol used in the killing was part of the father's collection, authorities said. German gun laws are fairly restrictive and require owners to control access to them. Do you think the gun control issue is taken seriously enough?
Rech said the guns were legally owned by Kretschmer's father who is a member of a gun club.
At least seven people were injured in the shootings -- five people in Winnenden and two police officers in Wendlingen -- police spokeswoman Renate Roesch added. She was unable to say how serious the injuries were.
Six teenagers from the from the school shooting were transported to the Waiblingen hospital with undisclosed injuries.
One of those patients has already been released from the hospital, according to a hospital spokeswoman. The families of the dead have been informed and are receiving counseling, Roesch said.
About 1,000 students attend the school where the killings began. Map of the area »
Authorities sealed off the town of Winnenden and launched an intense manhunt for the gunman after the school shootings. Police said the man was about 1.80m (5'11") and heavily armed.
"It is a small town, an idyllic town," said Frank Nipkau, the editor in chief of Winnenden Zeitung newspaper. "The town people are devastated and they can't understand why this is happening in this town."
Security at German schools has been an issue in the past.
In November 2006, an 18-year-old former student strapped explosives to his body and went on a rampage at a middle school in western Germany, shooting and wounding six people -- most of them students -- before killing himself.
In July 2003, a 16-year-old student shot a teacher before taking his own life at a school in the southern German town of Coburg. iReport.com: 'Fear and confusion' in German town
A year earlier, 18 people were killed when an expelled student went on a shooting spree at his school in eastern Germany.
Another European country, Finland, is planning to toughen firearm laws after two school shootings there left 20 people dead. Those incidents occurred in November 2007 and September 2008.
Finnish news reports on Wednesday said an Interior Ministry working group has issued a proposal calling for age 20 as the minimum age for handgun ownership and 18 as the minimum for rifles. The proposal will be circulated among legislators.
-- CNN's Katy Byron, Diana Magnay, Frederik Pleitgen, Nadine Schmidt and Ivan Watson contributed to this report.