The settlement grew slowly. In 1840 there were sixteen foreigners. In 1844 there were a dozen houses and fifty people. In 1845 there were but five thousand people in all the state. The missions had been disbanded and the Presidio was manned by one gray-haired soldier. The Mexican War brought renewed life. On July 9, 1846, Commodore Sloat sent Captain Montgomery with the frigate "Portsmouth," and the American flag was raised on the staff in the plaza of 1835, since called Portsmouth Square. Thus began the era of American occupation. Lieutenant Bartlett was made alcalde, with large powers, in pursuance of which, on February 27, 1847, he issued a simple order that the town thereafter be known as San Francisco,—and its history as such began.

The next year gold was discovered. A sleepy, romantic, shiftless but picturesque community became wide-awake, energetic, and aggressive. San Francisco leaped into prominence. Every nation on earth sent its most ambitious and enterprising as well as its most restless and irresponsible citizens. In the last nine months of 1849, seven hundred shiploads were landed in a houseless town. They largely left for the mines, but more remained than could be housed. They lived on and around hulks run ashore and thousands found shelter in Happy Valley tents. A population of two thousand at the beginning of the year was twenty thousand at the end. It was a gold-crazed community. Everything consumed was imported. Gold dust was the only export.

From 1849 to 1860, gold amounting to over six hundred million dollars was produced. The maximum—eighty-one millions—was reached in 1852. The following year showed a decline of fourteen millions, and 1855 saw a further decline of twelve millions. Alarm was felt. At the same ratio of decline, in less than four years production would cease. It was plainly evident, if the state were to exist and grow, that other resources must be developed.

In the first decade there were periods of great depression. Bank and commercial failures were very frequent occurrences in 1854. The state was virtually only six years old—but what wonderful years they had been! In the splendor of achievement and the glamour of the golden fleece we lose sight of the fact that the community was so small. In the whole state there were not more than 350,000 people, of whom a seventh lived in San Francisco. There were indications that the tide of immigration had reached its height. In 1854 arrivals had exceeded departures by twenty-four thousand. In 1855 the excess dropped to six thousand.

My first view of San Francisco left a vivid impression of a city in every way different from any I had ever seen. The streets were planked, the buildings were heterogeneous—some of brick or stone, others little more than shacks. Portsmouth Square was the general center of interest, facing the City Hall and the Post Office. Clay Street Hill was higher then than now. I know it because I climbed to its top to call on a boy who came on the steamer and lived there. There was but little settlement to the west of the summit.

The leading hotel was the International, lately opened, on Jackson Street below Montgomery. It was considered central in location, being convenient to the steamer landings, the Custom House, and the wholesale trade. Probably but one building of that period has survived. At the corner of Montgomery and California streets stood Parrott's granite block, the stone for which was cut in China and assembled in 1852 by Chinese workmen imported for the purpose. It harbored the bank of Page, Bacon & Co., and has been continuously occupied, surviving an explosion of nitroglycerine in 1866 (when Wells, Fargo & Co. were its tenants) as well as the fire of 1906. Wilson's Exchange was in Sansome Street near Sacramento. The American Theater was opposite. Where the Bank of California stands there was a seed store. On the northeast corner of California and Sansome streets was Bradshaw's zinc grocery store.

The growth of the city southward had already begun. The effort to develop North Beach commercially had failed. Meiggs' Wharf was little used; the Cobweb Saloon, near its shore end, was symbolic. Telegraph Hill and its semaphore and time-ball were features of business life. It was well worth climbing for the view, which Bayard Taylor pronounced the finest in the world.

At this time San Francisco monopolized the commerce of the coast. Everything that entered California came through the Golden Gate, and it nearly all went up the Sacramento River. It was distinctly the age of gold. Other resources were not considered. This all seemed a very insecure basis for a permanent state. That social and political conditions were threatening may be inferred when we recall that 1856 brought the Vigilance Committee. In 1857 came the Fraser River stampede. Twenty-three thousand people are said to have left the city, and real-estate values suffered severely.

In 1860 the Pony Express was established, bringing "the States," as the East was generally designated, considerably nearer. It took but ten and a half days to St. Louis, and thirteen to New York, with postage five dollars an ounce. Steamers left on the first and fifteenth of the month, and the twenty-eighth and fourteenth were religiously observed as days for collection. No solvent man of honor failed to settle his account on "steamer day."

The election of Lincoln, followed by the threat of war, was disquieting, and the large southern element was out of sympathy with anything like coercion. But patriotism triumphed. Early in 1861 a mass meeting was held at the corner of Montgomery and Market streets, and San Francisco pledged her loyalty.