'Heart-breaking'
Regional police chief Erwin Hetger said the teenager "went into the school with a weapon and carried out a bloodbath", according to the Associated Press.
"I've never seen anything like this in my life," he said.
Mr Hetger said informing the families of what had happened was a heart-breaking job.
"Our thoughts are concentrated on the parents. I have looked some of them in the eye, and it's damn hard to keep your composure," he said.
Local media reported that police had raided the youth's house and recovered 16 weapons.
The teenager's father, thought to be a prominent businessman in the area, was reported to be a member of a local shooting club.
Earlier, the chief reporter of the Stuttgart Journal newspaper, Kevin Latzel, told the BBC that there was a lot of confusion at the school.
"It's very horrible... the parents are crying, the pupils are crying and a lot of police is there and nobody knows really what happened," he said.
About 1,000 children are thought to attend the Albertville school, about 20km (12 miles) north-east of Stuttgart.
How German school shooting unfolded
The 17-year-old gunman walked into technical school Albertville-Realschule in Winnenden at 0930 local time (0830 GMT) on Wednesday.
Dressed in black, he started firing at random, killing nine students and three teachers.
At 0933, police received a emergency call and sent two response teams. They found the victims' bodies in two classrooms.
As the police arrived, the gunman fled. He passed a psychiatric clinic near the school and shot dead someone else.
The gunman headed towards the centre of Winnenden, where he is reported to have hijacked a car. Reports say he released the car's owner before continuing on his own.
Police mobilised 1,000 officers and helicopter teams to try to locate the gunman. The school was evacuated and roadblocks set up.
Local media broadcast warnings to drivers not to pick up hitchhikers.
The gunman drove 40km (25 miles) to the town of Wendlingen, where he barricaded himself in a supermarket. He killed two passersby before being fatally injured during a shoot-out with police at about 1300.
Two policemen are also reported to be have been injured.