In the first half-century of Spanish rule, a network of Spanish cities was created, sometimes on pre-Columbian sites. The capital Mexico City was and remains the premier city. Cities and towns were hubs of civil officials, ecclesiastics, business, Spanish elites, and mixed-race and indigenous artisans and workers. When deposits of silver were discovered in sparsely populated northern Mexico, far from the dense populations of central Mexico, the Spanish secured the region against fiercely resistant indigenous Chichimecas.  The Viceroyalty at its greatest extent included the territories of modern Mexico, Central America as far south as Costa Rica, and the western United States. The Viceregal capital Mexico City also administrated the Spanish West Indies (the Caribbean), the Spanish East Indies (that is, the Philippines), and Spanish Florida. In 1819, the Spain signed the Adams-Onís Treaty with the United States, setting New Spain's northern boundary.