From its earliest days, Buenos Aires depended primarily on trade. During most of the 17th century, Spanish ships were menaced by pirates, so they developed a complex system where ships with military protection were dispatched to Central America in a convoy from Seville (the only port allowed to trade with the colonies) to Lima, Peru, and from it to the inner cities of the viceroyalty. Because of this, products took a very long time to arrive in Buenos Aires, and the taxes generated by the transport made them prohibitive. This scheme frustrated the traders of Buenos Aires, and a thriving informal yet accepted by the authorities contraband industry developed inside the colonies and with the Portuguese. This also instilled a deep resentment among ''porteños'' towards the Spanish authorities.