The area was inhabited by the Ohlone and Costanoan Indians. Beginning in 1603 Mexican settlers created ranches in the area. In 1842 the Sanchez Adobe was constructed. Limestone removed from the Rockaway Beach area was transported by the Ocean Shore Railroad to help rebuild San Francisco after the devastating 1906 earthquake. The city was incorporated in 1957 by combining nine unincorporated communities.