From 1616 to 1696 the Vladikas were elective, and under their quarrelsome rule Cetinje was twice burnt and phoenix-like rose again from its ashes. The Turkish armies, though partially victorious, usually met with disaster and ruin before reaching their own territory again; and we read of one notable occasion when Soliman Pasha, with an army of 80,000 men, had sacked Cetinje. On his way home he was surprised by the two tribes of Kuc and Klementi, and annihilated. But as time went on it became necessary from political reasons to change the system of government from election to heredity, and the choice fell on the Lord of Njegusi Danilo Petrovic, whose reign (1696-1735) is chiefly memorable for the Montenegrin vespers of the Turks and Turkish renegades, who had rendered so much assistance to Kiuprili Pasha in one of his terrible invasions. But a crushing defeat of the Turks in 1706 gave the land peace for thirty years.
In 1767 an adventurer named Stefan Mali sprang himself upon the land. He claimed to be the murdered Peter III. of Russia, and easily imposed himself upon the gullible Montenegrin. But he had the interests of Montenegro sincerely at heart, and proved an excellent ruler. His imposture was exposed by Catherine II., but owing to the weakness of the Petrovic heir, the people determined to keep him as their ruler. He fell a victim to the assassin’s knife at the instigation of the Pasha of Scutari. His successor, Peter Petrovic, the famous St. Peter of Montenegrin history, was a firm and courageous ruler, who made his influence felt throughout the courts of Europe. Austria, Russia, and England did not scruple to avail themselves of his help and then, as seems to be the Montenegrin fate, left him in the lurch. He defied the armies of the great Napoleon, who came to fear him and his warlike clan insomuch that he was even offered terms of friendship. But the proud mountaineer would have none of it. He now turned his hand, under the influence of Russia, which was then very real, to the consolidation of the land, and slept in peace with his fathers.
His successor, Peter II., carried on the struggle with the Turks, who proposed an increase of territory and a Turkish title in return for the acknowledgment of suzerainty. “As long as my people defend me,” was the proud answer, “I need no Turkish title to my throne; if they desert me, such a title would avail me little.” War was the effect of this retort, but the Turks gained nothing by it, and peace was soon made.
The danger of the power of Austria came now to be fully recognised. After the Napoleonic wars, Austria had retained Cattaro and Spizza, and trouble now broke out over some land near Budua. The Montenegrins fell upon the Austrians, and fierce conflicts ensued, but Peter, who had gained an extraordinary hold over his subjects, forbade them to continue. Hostilities, however, continued in a desultory fashion for some time.