By the Treaty of Tordesillas of 1494, the globe was divided into two hemispheres between Spain and Portugal. Therefore, Spain had the right to start colonies in all of the New World from Alaska to Cape Horn (except Brazil), as well as Asia. The Castilian Empire was the result of a period of rapid colonial expansion into the New World, as well as the Philippines and colonies in Africa: Melilla was captured by Castile in 1497 and Oran in 1509.