ernment was little more than a military dictatorship. The army dominated affairs both at Rio de Janeiro and in the states. Freedom of the press disappeared and elections were controlled by those in power". In 1894 the republican civilians rose to power, followed by a "prolonged cycle of civil war, financial disaster, and government incompetence." By 1902, the government was successful in negotiating several treaties that expanded (with the purchase of Acre) and secured the Brazilian boundaries.
In the 1920s the country was plagued by several rebellions caused by young military officers. By 1930, the regime was weakened and demoralized, which allowed the defeated presidential candidate Getúlio Vargas to lead a coup d'état and assume the presidency. Vargas was supposed to assume the presidency temporarily but instead, he closed the National Congress, extinguished the Constitution, ruled with emergency powers and replaced the states' governors with his supporters. In 1935 Communists rebelled across the country and made an unsuccessful bid for power. The communist threat, however, served as an excuse for Vargas to launch another coup d'état in 1937 and Brazil became a full dictatorship. The repression of the opposition was brutal with more than 20,000 people imprisoned, internment camps created for political prisoners in distant regions of the country, widespread torture by the government agents of repression, and censorship of the press.
Brazil remained neutral during the early years of World War II until the government declared war against the Axis powers in 1942. Vargas then forced German, Japanese and Italian immigrants into concentration camps, and, in 1944, sent troops to the battlefields in Italy. With the allied victory in 1945 and the end of the Nazi-fascist regimes in Europe, Vargas's position became unsustainable and he was swiftly overthrown in a military coup. Democracy was reinstated and General Eurico Gaspar Dutra was elected president