Six months before the United States declared war on Mexico on May 13, 1846,
President James Polk had given orders to the U.S. Navy's
Pacific Squadron to occupy every important port and city in California, with force, if necessary, upon learning beyond doubt that war had broken out. in 1839; the town square (later renamed
Portsmouth Square) is just south of the
compass rose.|left In
Monterey, California, U.S. Consul
Thomas O. Larkin, concerned about the increasing possibility of war, sent a request to
Commodore John D. Sloat of the Pacific Squadron, for a warship to protect U.S. citizens and interests in
Alta California. In response, the , commanded by
John Berrien Montgomery, arrived at Monterey on April 22, 1846, and moved to
San Francisco Bay by mid-May, anchoring at Sausalito. While there, a messenger from American Captain
John C. Frémont's expedition requested supplies from the
Portsmouth, which soon returned to Monterey. After Montgomery conveyed the information about Frémont's presence in California, Larkin and Montgomery decided the ship should return to San Francisco Bay. She sailed north from Monterey on June 1. On June 14, 1846, the
Bear Flag Revolt, an uprising of American settlers, tacitly supported by Frémont, engaged and soon took control of the
Sonoma Barracks. On July 1, Frémont and twelve men convinced Captain William Phelps to ferry them from Sausalito to
Castillo de San Joaquin, an abandoned fort south of the side of the
Golden Gate, where they plugged the touch-holes of ten rusty cannons. The next day
Robert B. Semple led ten men to the pueblo of Yerba Buena to arrest the naturalized Englishman Robert Ridley, who was captain of the port. Ridley was sent to
Sutter's Fort to be locked up with other prisoners. The rebels also took down the
Mexican flag and raised the
Bear Flag over the plaza at Yerba Buena. On July 7, the ships , and
captured the Alta California capital city of Monterey without firing a shot. This set the stage for the capture of Yerba Buena two days later. ==Capture of the city==