Andrijana Nastic, the prosecutor co-ordinating the crime scene investigation, told journalists the gunman was killed by a passerby and that a police officer was among the wounded. She said nine of those killed died at the scene and two died at a hospital where they were taken for surgery.
Cetinje, the seat of Montenegro's former royal government, is 36km west of Podogrica, the current capital of the small Balkan nation.
Prime Minister Dritan Abazovic wrote on his Telegram channel that the incident was "an unprecedented tragedy" and urged the nation "to be, in their thoughts, with the families of the innocent victims, their relatives, friends and all the people of Cetinje".
President Milo Djukanovic said on Twitter he was "deeply moved by the news of the terrible tragedy" in Cetinje, calling for "solidarity" with the families who lost loved ones in the incident.