 Another contributing factor that spurred migration to Sandžak from the Old Montenegro was the fact that the old Orthodox population of Sandžak moved towards Serbia and Habsburg Monarchy (Vojvodina) in two waves, first after 1687, and then, after 1740, basically leaving Sandžak depopulated.The advance of increasingly stronger ethnic Serbs of Montenegro caused additional resettlements out of Montenegro proper in 1858 and 1878, when, upon Treaty of Berlin, Montenegro was recognized as an independent state.While only 20 Bosniak families remained in Nikšić after 1878, the towns like Kolašin, Spuž, Grahovo, and others, completely lost their Bosniak population.