After the fall of Catalonia in February 1939, the military situation of the Republic was hopeless. The Republic still had the capital city and 30 per cent of Spanish territory, but it had lost 220,000 soldiers, the second city of the country, and the industrial resources of Catalonia. Furthermore, on 27 February Manuel Azaña, the president of the Republic, resigned and the United Kingdom and France recognized the Nationalist government.
The Republican army still had between 250,000 and 500,000 men, but had only 40 aircraft (three Natasha and two Katiuska bomber squadrons, and 25 Chatos and Moscas fighters), little artillery and few automatic weapons. Many soldiers were unarmed (in December 1938 the Republican army had only 225,000 rifles), and lacked shoes and overcoats. In Madrid, there was food for only two months, and no water, heating, medicine or surgical dressings. On the other hand, the Nationalist army had more than a million men at the end of 1938; among them 35,000 Moroccans, 32,000 Italians and 5,000 Germans, plus 600 aircraft.
On 16 February, the high command of the Republican army told the prime minister, Juan Negrín, that further military resistance was impossible. Most of the members of the Republican Army, the PSOE, the UGT and the CNT, believed that it was necessary to initiate peace negotiations. Nevertheless, Negrín, backed by the Communist PCE, wanted to continue fighting, because Franco rejected giving any guarantee against reprisals and he believed that a continental war against fascism was imminent. Furthermore, he wanted to organize the evacuation of those most at risk.
From the end of February 1939, Colonel Segismundo Casado had been preparing a coup against the Negrín government in order to start peace negotiations with the Nationalists, believing that the government was too subordinate to the Communists. Colonel José Cendaño, a Fifth column agent inside the Republican army, promised to him that Franco would guarantee the lives of the Republican officers who had committed no crimes. Most of the non-communist elements of the Popular Front in Madrid supported the plot, among them one of the leaders of the PSOE, Julián Besteiro, because they believed that continuing the war was useless. Furthermore, after the surrender of Minorca, many Republican officers in the central zone believed that they could negotiate a deal with the Nationalists.
On 2 March, Negrín announced a number of new appointments in the Central Zone. Colonel Casado and the Communists Juan Modesto and Antonio Cordón García became Generals, General Manuel Matallana was appointed as head of the central general staff and communist officers were appointed to command the ports of Murcia (Manuel Tagüeña), Alicante (Etelvino Vega) and Cartagena (Francisco Galán). (According to Beevor, Francisco Galan was appointed military governor of Cartagena; Etelvino Vega governor of Alicante; Leocadio Mendiola commander of Murcia; and Inocencio Curto commander of Albacete). The non-communist elements believed that the communists wanted to control the evacuation harbors and joined the plot against Negrín.
On 5 March 1939, Colonel Segismundo Casado, supported by General Matallana, the CNT (Cipriano Mera), the secret service of the Republic (the Military Investigation Service, Servicio de Investigación Militar or SIM), a section of the PSOE (Julian Besteiro) and a section of the UGT (Wenceslao Carrillo), deposed Negrín and formed a military junta, the National Council of Defense (Consejo Nacional de Defensa) in order to negotiate a peace deal with Franco. On 6 March, Miaja joined the rebellion and was appointed president of the junta. The other members of the junta were Casado, Julian Besteiro, Wenceslao Carrillo, Gonzalez Marín and Eduardo Val (CNT), Antonio Perez (UGT), and the republicans Miguel San Andrés and Jose del Río.
Colonel Adolfo Prada was appointed commander of the Army of the Centre, the communist commanders of the I, II and III Army Corps of the Army of the Centre were relieved, the PCE's newspaper Mundo Obrero was closed and Casado ordered massive arrests of communist commissars and militants. Ironically, Casado's justification for the coup was that Negrín and the PCE wanted to carry out a Communist takeover – an identical justification to the Nationalist uprising that began the Civil War – but in fact, he rose against the government because he wanted to negotiate peace and believed that removing Negrín and the Communists was a precondition to negotiations with Franco. In addition to other assurances, the British government said to him that Franco would guarantee the lives of the Republicans. Casado had said to the commander of the Republican Air Force, Hidalgo de Cisneros: “I give you my word...that I can obtain better terms from Franco than Negrín ever can. I can even assure you that they will respect our ranks.”.
After a failed attempt to negotiate with Casado, on 6 March Negrín fled to France from the Monovar's airfield, near Elda, with Hidalgo de Cisneros, the leaders of the PCE (La Pasionaria and Vicente Uribe), and the foreign minister Julio Álvarez del Vayo, in order to avoid capture by the supporters of Casado (Casado wanted to arrest the government and the PCE's leaders in order to hand them over to the Nationalists).
Casado's coup was supported by the commanders of the other three Armies of the Republican Army (Leopoldo Menéndez López, commander of the Levante Army; Antonio Escobar, commander of the Estremadura Army; and Domingo Moriones, commander of the Andalusia Army). Nevertheless, the army units settled around Madrid and controlled by the PCE (the I corps of the Army of the Centre led by Luis Barceló and the Emilio Bueno’s II and Antonio Ortega’s III Corps), rose against the junta on 7 March, starting a brief civil war inside the Republic. Barceló appointed himself as commander of the Army of the Centre and his troops closed all the entrances to Madrid, occupied most of the city center and detained and shot three of Casado's colonels. The supporters of Casado only held some government buildings and the south-east part of the city. Nevertheless, Mera's IV corps counterattacked and occupied Torrejón and Alcalá de Henares as the Nationalists started an offensive towards the Manzanares. By 10 March, Barceló's troops had been surrounded and ceasefire was arranged. On 11 March, after days of bloody combat, Casado, backed by the IV corps of Cipriano Mera, defeated Barceló’s troops. Barceló and his commissar José Conesa were arrested and executed. There were hundreds of dead (Thomas: 230, Jackson: 1,000, and Beevor: 2,000 dead).
There was also combat in Ciudad Real and Cartagena. In Ciudad Real Escobar's Extremadura Army crushed the communist resistance led by the deputy Martínez Cárton. Nevertheless, in Cartagena (the main base of the Spanish Republican Navy), where the supporters of Casado, backed by elements of the a fifth column, had started the uprising against Negrín's government on 4 March, they were defeated by the PCE's 206th Brigade, of the IV Division, led by colonel Joaquín Rodríguez, after a brief battle, on 7 March. Nevertheless, on 5 March, the Republican Navy (three cruisers and eight destroyers), led by Admiral Buiza, had fled to Bizerte after a Nationalist aerial bombardment. One Nationalist transport ship, the Castillo de Olite, sent by the Nationalists in order to support the uprising, was sunk by the coastal batteries of Cartagena, killing 1,200 Nationalist soldiers.
After the defeat of Barceló's troops, the Council tried to start peace negotiations with Franco, hoping to achieve a guarantee against political reprisals. On 12 March the Council proposed a peace deal, asking for a guarantee against reprisals and a period of 25 days to allow anyone who wanted to leave Spain to do so. On 16 March, Franco answered that he would only accept an unconditional surrender. On 23 March, the Council sent two negotiators to Burgos (Colonel Antonio Garijo and Major Leopoldo Ortega), and the Nationalists told them that on 25 March the Republican Air Force had to be surrendered and by the 27th the Republican troops had to raise the white flag. Nevertheless, on 25 March, the Republicans did not surrender their Air Force due to bad weather and Franco broke off negotiations with the junta.
On 26 March, Yagüe’s troops advanced in Sierra Morena. There was no resistance and in one day they captured two thousand square kilometers of land and 30,000 prisoners. The Junta ordered its soldiers not to resist the Nationalist advance and the Republican soldiers threw away their weapons and abandoned the front. By 27 March, the Nationalists were advancing on all fronts without resistance. Solchaga's Navarra Corps, Gambara's CTV and Garcia Valiño's Army of Maestrazgo advanced from Toledo. On 28 March, Colonel Prada, commander of the Army of the Centre, surrendered to the Nationalists and Nationalist troops occupied Madrid. Casado and the other members of the junta, except Besteiro, fled to Valencia. On 29 March, the Nationalists occupied Jaén, Ciudad Real, Cuenca, Albacete and Sagunto. 50,000 Republican refugees gathered at the harbours of Valencia, Alicante, Cartagena and Gandia, but without the Republican navy, an evacuation was impossible and the French and British governments refused to organise an evacuation. Only a minority, those who had money to pay for passage, were evacuated by British ships (between 650 and more than 3,500), among them Casado. On 30 March, the Nationalists occupied Valencia and Gambara’s troops entered Alicante, rounding up 15,000 Republican refugees. The Italian General Gambara was prepared to permit the evacuation of political refugees, but on 31 March, the Nationalist troops arrived and took over jurisdiction from Gambara. As a result, many refugees committed suicide in order to avoid capture by the Nationalists. On 31 March, the Nationalists occupied Almeria, Murcia and Cartagena, controlling all Spanish territory. By 1 April 1939 the war was effectively over.
On April 1, the United States recognised the Nationalist government, leaving the Soviet Union as the only major power that did not recognise it. The new regime had signed a Non-Aggression Pact with Portugal and a treaty of friendship with Nazi Germany on March 31, and on April 6, Franco made public Spain's adherence to the Anti-Comintern Pact. On April 20, the Non-Intervention Committee was dissolved and by June Italian and German troops had left Spain. The Francoist dictatorship remained until Franco's death in 1975.
Casado remained in exile in Venezuela until returning to Spain in 1961. Cipriano Mera fled to Oran and Casablanca, but he was extradited to Spain in February 1942. In 1943, he was condemned to death, a sentence that was exchanged for 30 years in prison, but he was set free in 1946 and fled to France. Miaja fled to France and then Mexico, where he died in 1958. Matallana was detained and imprisoned by the Nationalists and died in Madrid in 1956. Besteiro was arrested by the Nationalists, where he faced a court martial and was sentenced to 30 years in prison. He died in prison in 1940.
The Nationalists arrested hundreds of thousands of Republican soldiers and civilians, with 150,000 soldiers captured in the final offensive, and herded them into improvised concentration camps. There were between 367,000 and 500,000 prisoners in 1939. In the first years after the war, 50,000 Republican prisoners were executed.
Casado's coup and the last days of the war are the background of the Max Aub's novels, Campo del Moro and Campo de los Almendros.