The "raison d'être" for the "Rivadavia" class can be traced back to Argentine–Chilean territorial disputes over the boundary of Patagonia and control of the Beagle Channel going back to the 1840s. It nearly led to war in 1878 and kindled a naval arms race from 1887 to 1902 which was only settled via British mediation. As part of the three pacts which ended the dispute, restrictions were placed on the navies of both countries. The British Royal Navy bought two pre-dreadnought battleships that were being built for Chile, and Argentina sold its two "Rivadavia"-class armored cruisers under construction in Italy to Japan. Meanwhile, beginning in the late 1880s, Brazil's navy fell into obsolescence after an 1889 revolution, which deposed Emperor Dom Pedro II, and a 1893 civil war. By the turn of the 20th century it was lagging behind the Chilean and Argentine navies in quality and total tonnage, despite Brazil having nearly three times the population of Argentina and almost five times the population of Chile.