In 1908, the Ottomans underwent a revolution by the Young Turks. Abdul Hamid II abdicated, and Mehmed V was instated. Bulgaria gained independence, and Austria invaded Bosnia that same year. In 1912, the Ottomans lost Libya to the Italians. The ensuing Balkan Wars saw the Ottomans lose all of their European territories except Eastern Thrace to a combined force of Serbia, Montenegro, Greece, and Bulgaria. The Second Balkan War allowed the Ottomans to attack Bulgaria in conjunction with Romania, Serbia, Montenegro, and Greece. Their victory meant little since the unrest continued, with a 1909 countercoup to the Young Turk coup and then three countercoups.