In 1821, several parts of Western Thrace rebelled against Ottoman rule and participated in the Greek War of Independence. During the Balkan Wars, Western Thrace was occupied by Bulgarian troops, and in 1913, Bulgaria gained Western Thrace under the terms of the Treaty of Bucharest. After World War I, Western Thrace was withdrawn from Bulgaria under the terms of the 1919 Treaty of Neuilly and temporarily managed by the Allies before being it was given to Greece at the San Remo Conference in 1920.