When Commodore John D. Sloat of the United States Navy sailed into Monterey Bay and began the military occupation of California by the United States , Northern California capitulated in less than a month to the U.S. forces .
This Republic ended suddenly , however , when Commodore John D. Sloat of the United States Navy sailed into San Francisco Bay .