A 34-year-old man killed 10 people on the streets of Cetinje before being shot dead by a passerby, officials said. They said it was unclear what had provoked the attack.