With the Principality's full independence in 1878 and its transformation into the Kingdom of Serbia in 1882, Belgrade once again became a key city in the Balkans, and developed rapidly. Nevertheless, conditions in Serbia remained those of an overwhelmingly agrarian country, even with the opening of a railway to Niš, Serbia's second city. In 1900, the capital had only 70,000 inhabitants (at the time Serbia numbered 2.5 million). Still, by 1905, the population had grown to more than 80,000 and, by the outbreak of World War I in 1914, it had surpassed the 100,000 citizens, disregarding Zemun, which still belonged to Austria-Hungary.