During much of the 19th and the 20th centuries, conflicts with Argentina over Uruguay and Paraguay on behalf of Brazil and over Patagonia on behalf of Chile made Brazil and Chile close allies. During the War of the Pacific, with Chile fighting against Peru and Bolivia, Brazil provided tacit support for Chile, forced Argentina which attempted to join the Peruvian–Bolivian alliance, to stay neutral throughout the war.