The Portuguese Empire was one of the first and longest lasting global empires in history, spanning almost six centuries. Portuguese explorers began exploring the coast of Africa in the early 15th century and eventually established colonies in South America, Africa, Asia, and Oceania. However, by the 17th and 18th centuries Portugal had lost much of its wealth and military dominance as other European powers took over its scattered trading posts. Brazil was discovered accidentally in 1500 by Portuguese explorer Pedro Alvares Cabral and became a major colony, with its economy initially based on brazilwood, gold, sugar, and the slave trade.