General Miguel Primo de Rivera's dictatorship over Spain began with a coup on 13 September 1923 and ended with his resignation on 28 January 1930. It took place during the wider reign of King Alfonso XIII. In establishing his dictatorship, Primo de Rivera ousted the liberal government led by Prime Minister Manuel García Prieto and initially gained the support of King Alfonso XIII and the army. During the Military Directory (1923–1925), the dictatorship created the official party of the regime, the Unión Patriótica (UP). It also censored the Spanish press and worked to eliminate separatism in Catalonia. Under Primo de Rivera's dictatorship, Spain won the Rif War, where Spanish forces fought Riffian tribes in Morocco. Primo de Rivera's dictatorship established the Civil Directory in 1925. During the Civil Directory, Primo de Rivera created the National Assembly, where Spanish corporations had their interests represented. The dictatorship formed good relationships with Italy and increased its interactions with countries in Latin America. It invested heavily in Spanish infrastructure, such as roads and railways, and expanded labour laws to assist nursing mothers in the workforce. Throughout the dictatorship, women became an increasing percentage of Spain's skilled labour. In 1929 an economic downturn occurred, and the value of the Spanish peseta fell. The army's grievances with Primo de Rivera grew, and seeing this, the King stopped supporting the dictatorship. Primo de Rivera resigned in 1930, ending his dictatorship, and General Dámaso Berenguer succeeded him before Spain's Second Republic was established in 1931. Background After the 1898 Spanish defeat to the United States, where Spain lost its remaining colonies in the Philippines, Cuba, and Puerto Rico, Spain experienced increasing social strife. Along with the defeat of Annual in 1921 against Riffian tribesmen in Spain’s Moroccan Protectorate, Spain was dominated by a desire for regeneration. Following the defeat at Annual, the Spanish parliament inquired into assigning responsibility for the loss. Right before Primo de Rivera took over, the results of this inquiry were going to be released to the public, and they implicated many high-ranking military officials. This exacerbated the deteriorating relationship between the politicians and the military, who felt the politicians were to blame. The military at first planned to install a new government led by General Francisco Aguilera, president of the Supreme Council of Military Justice, but they ultimately chose Primo de Rivera to lead this new government. The coup (1923) On 13 September, Primo