During his term in office, Stamboliyski made a concerted effort to improve relations with the rest of Europe. This resulted in Bulgaria becoming the first of the defeated states to join the League of Nations in 1920. Though popular with the peasants, he antagonized the middle class and military. He was ousted in a military coup in June 1923. He attempted to raise a rebellion against the new government, but was captured by the IMRO, who detested him for renouncing Bulgarian claims on the territory of Macedonia, was brutally tortured, and killed.