Two girls were injured when they were attacked on their way to school in southwestern Germany on Monday morning.
The spokesman said he could not provide further details on the attack, which took place in Illerkirchberg, a town of about 5,000 people west of Munich.
It was reported earlier that the attacker used a knife.
After arriving at the scene and tending to the two seriously injured girls, police discovered that a suspect had fled into a neighboring building, said Wolfgang Juergens, a police spokesman in the German city of Ulm.
People inside the building have been arrested, he said, without saying how many people were found or if any of them were the suspected attacker.
“Everything further will come out of the ongoing investigation,” he said.