Immediately after the overthrow of the Spanish authorities, the ports of California began to be the resort of foreigners, principally whalers and traders from the United States. The trade in which they engaged, that of exchanging manufactured goods for the provisions, hide and tallow furnished by the natives, was at first irregular, but as it increased, it became more systematic, and mercantile houses were established in the principal ports. The Mexican government became dissatisfied with this state of things, and ordered the governor of Upper California to enforce the laws which prohibited foreigners from entering or residing in the territories of Mexico without a special permission from the authorities. Accordingly, in 1828, a number of American citizens were seized at San Diego, and kept in confinement until 1830. In that year, an insurrection broke out, headed by General Solis, and the captured Americans were of some assistance in suppressing it, and, in consideration of their services, they were permitted to leave the territory.
The Mexican government strove to prevent the evils expected to flow from the presence of numbers of foreigners in California, by establishing colonies of their own citizens in the territory. A number of persons were sent out from Mexico, to settle on the lands of the missions, but they never reached their destination. The administration which originated the scheme was overthrown, and the new authorities ordered the settlers to be driven back to Mexico. In 1836, the federal system was abolished by the Mexican government, and a new constitution adopted, which destroyed all state rights, and established a central power. This was strenuously resisted in California. The people rose, and drove the Mexican officers from the country, declaring that they would remain independent until the federal constitution was restored. The general government issued strong proclamations against the Californians, and sent an expedition to re-establish its authority. But General Urrea, by whom the expedition was commanded, declared in favor of the federalists, and the inhabitants governed themselves until July, 1837, when they swore allegiance to the new constitution.