The German state premier says the perpetrator of the attack, a doctor from Saudi Arabia, is in police custody.