The Treaty of San Stefano in 1878 carved the independent kingdoms of Serbia, Bulgaria and Montenegro from the crumbling Ottoman Empire. These new kingdoms sought the liberation of their nationals still under Ottoman rule. In concert with Greece, they formed the Balkan League and declared war against the Ottomans in October 1912. After less than seven months of fighting, the Treaty of London effectively expelled the Ottomans from Europe, bar a wedge of land in eastern Thrace. This dramatic success immediately gave rise to disputes amongst the erstwhile allies over division of the spoils. In June 1913, Bulgaria attacked Greek and Serbian positions in Macedonia and was confronted by a counterattack, after which both Romania and the Ottomans also invaded Bulgaria. Overwhelmed, Bulgaria sued for peace and in the Treaty of Bucharest ceded most of Macedonia to Greece and Serbia, Adrianople to the Ottomans and southern Dobruja to Romania.