With the advent of naval capability the Portuguese began the conquest of the world, to the East towards Asia , and to the West as far the Americas. They arrived in Brazil under the command of Pedro Alvares Cabral, who claimed the new land as his own in 1500. They were not alone for too long. In 1630 the Dutch looked to chip on the bounty and invaded Brazil. The industrious Portuguese managed to drive away the Portuguese in 1654 retaining their power over Brazil which had organised society living in the country as early as 9000 BC. Spain, an integral part Portugal, signed a treaty with Portugal in 1750 thereby carving out areas for themselves in the continent of South America. In the meantime the royals from Portugal relocated to Brazil and run both Brazil and their European homeland from Rio de Janeiro from 1808 to 1821. Finally in 1822 Brazil broke ties with Portugal, announcing its independence. It took another six decades for Brazil to abolish slavery 1888, and became a republic in 1889. Getulio Vargas was elected the president of Brazil by military officials in 1930. By the end of Second World War in 1945 Vargas was overthrown in a military coup.