Vladika Petar I Petrović Njegoš was an important figure in establishing the Montenegrin national identity in the 19th century. He lived in Cetinje and wrote books that promoted Montenegrin culture, such as The Mountain Wreath. After Njegoš, Danilo Petrović became ruler and proclaimed Montenegro a principality. Later, King Nikola Petrović succeeded Danilo and Montenegro became a kingdom. In 1878 at the Berlin Congress, Montenegro gained independence and territorial expansion.