Economically, Mexico City prospered as a result of trade. Unlike Brazil or Peru, Mexico had easy contact with both the Atlantic and Pacific worlds. Although the Spanish crown tried to completely regulate all commerce in the city, it had only partial success.