On 17th and 18th July military garrisons in Melilla, the Balearics and the Canaries rose against the Republican government, and soon other regions joined the uprising. There had been a progressive radicalisation of some political groups which eventually provoked the revolt. A military coup seemed imminent and after the conservative politician, Calvo Sotelo, was assassinated by Socialists the rising took place. The Government clearly suspected something was about to happen and had tried to take measures by sending some Generals to different parts of the country, including Franco, Goded, Mola, Varela and Orgaz. The rebels' plans were not entirely successful and the country was divided into two, with each side in control of one half. In the area controlled by the rebels civil power was substituted by military power and the "Junta de Defensa Nacional" of Burgos was set up. This was only a provisional situation as General Franco quickly became leader of all Nationalist military forces. In the Republican half of the country the political parties and trade unions held power. After three years of bloody battles that left both sides exhausted, Franco's troops, which had already taken the majority of Spanish territory, entered Madrid, the last Republican stronghold, on 28th March 1939. On 1st April 1939 Generalissimo Franco's headquarters published a statement declaring the Nationalist victory and the end of the war.