In March 1923, Stamboliyski signed an agreement with Yugoslavia recognizing the new border and agreeing to suppress IMRO. This triggered a nationalist reaction, and on 9 June there was a coup organized by the armed forces under General Ivan Valkov's Military Union with support from the Tsar and other right wing elements of the Tsardom after the AP controlled 87% of Parliament in the elections that year. The Bulgarian government could only muster a handful of troops to resist, and even worse was a peasant mob with no guns rallied by Stamboliyski. Despite this, the streets of Sofia erupted in chaos and the hapless prime minister was lynched in addition to attacks on unarmed peasants. The whole affair seriously tarbrushed Bulgaria's international image. A right wing government under Aleksandar Tsankov took power, backed by the Tsar, the army and the VMRO, who waged a White terror against the Agrarians and the Communists. The Communist leader Georgi Dimitrov fled to the Soviet Union. There was savage repression in 1925 following the second of two failed attempts on the Tsar's life in the bomb attack on Sofia Cathedral (the first attempt took place in the mountain pass of Arabakonak). But in 1926 the Tsar persuaded Tsankov to resign and a more moderate government under Andrey Lyapchev took office. An amnesty was proclaimed, although the Communists remained banned. The Agrarians reorganised and won elections in 1931 under the leadership of Nikola Mushanov.