As a result, firstly of the Treaty of San Stefano in 1878, then of the modified Treaty of Berlin the same year which split the Ottoman Empire, Kosovo became the first line of defense for the Ottoman Empire, with large garrisons of Ottoman troops being stationed in the province. Before the First Balkan War in 1912, the province's shape and location denied Serbia and Montenegro a common land border. After the war, the major part of the vilayet was divided between Montenegro and Serbia. These borders were all ratified at the Treaty of London in 1913. The Ottoman Empire finally recognised the new borders following a peace deal with the Kingdom of Serbia on 14 March 1914.