By the early 20th century, Bulgaria, Greece, Montenegro and Serbia had achieved independence from the Ottoman Empire, but large elements of their ethnic populations remained under Ottoman rule. In 1912, these countries formed the Balkan League. The First Balkan War began on 8 October 1912, when the League member states attacked the Ottoman Empire, and ended eight months later with the signing of the Treaty of London on 30 May 1913. The Second Balkan War began on 16 June 1913, when Bulgaria, dissatisfied with its loss of Macedonia, attacked its former Balkan League allies. The more numerous combined Serbian and Greek armies repelled the Bulgarian offensive and counter-attacked into Bulgaria from the west and the south. Romania, having taken no part in the conflict, had intact armies to strike with and invaded Bulgaria from the north in violation of a peace treaty between the two states. The Ottoman Empire also attacked Bulgaria and advanced in Thrace regaining Adrianople. In the resulting Treaty of Bucharest, Bulgaria conserved most of the territories it had gained in the First Balkan War in addition to being forced to cede the ex-Ottoman south part of Dobruja province to Romania.