On 15 November 1889 a military coup in Rio de Janeiro ended the Brazilian Empire without a fight. Emperor Pedro II, weary and isolated, boarded a ship for Europe, and Marshal Deodoro da Fonseca proclaimed a republic. The new order rested on an alliance of the army, the coffee planters of Sao Paulo, and urban enthusiasts of positivism, the philosophy whose motto, Order and Progress, still decorates the Brazilian flag. A constituent congress produced the constitution of 1891, which created a decentralized federal republic, separated church and state, and gave broad power to the states.
In practice, power belonged to the states and their oligarchies. Politics ran on what Brazilians called coronelismo: local bosses, the colonels, controlled the votes of their rural clients in exchange for favors and protection. At the national level, the two strongest states, Sao Paulo and Minas Gerais, used their weight to place their candidates in the presidency more often than not, an understanding nicknamed coffee-with-milk politics. Elections were open affairs marked by fraud; the franchise formally excluded women and the illiterate, and corruption plus local intimidation kept most of the poor from voting, so the vast majority of Brazilians had no political voice.
The economy of the republic was built on coffee and booms. The early years brought the Encilhamento, a speculative mania of banknotes and bubbles that burst in 1891. Coffee, led by Sao Paulo, expanded relentlessly, supported after 1906 by valorization schemes in which the government bought and stored surplus beans to defend the price. For a generation, wild rubber from the Amazon made Manaus one of the richest cities in the tropics, until Asian plantations destroyed the trade after 1910. Railways, ports, and European immigration, above all to the coffee fields of Sao Paulo, completed the picture of a country racing to modernize its export economy.
The republic's apparent calm concealed chronic revolt. The navy rose against the government in 1893, monarchist rebels fought in the south, and the army destroyed the backlands community of Canudos in 1897. In 1904 Rio's poor rioted against a forced vaccination campaign. When the First World War came, Brazil joined the Allies in 1917 after German submarines sank its ships. The postwar years brought coffee crises, labor unrest, and a new threat from within the army: young lieutenants, the tenentes, rose in revolt in 1922 and again in 1924, seizing Sao Paulo for three weeks. By 1924 the First Republic's oligarchic system was visibly breaking down.