The site, at the southern end of the Palos Verdes Peninsula, on the west side of San Pedro Bay, was used by Spanish ships starting in the 1540s. Regular settlement began in 1769 as part of the effort to populate California, although trade restrictions encouraged more smuggling than regular business. When Mexico won its independence, the trade restriction were lifted, and the town flourished, and under United States control after 1848, the harbor was greatly improved under the guidance of Phineas Banning, and San Pedro became a major port of the West Coast.
In 1906 the city of Los Angeles annexed a long narrow strip of land connecting the city to the coast, and in 1909, the city annexed San Pedro and the adjacent town of Wilmington. The odd shape is still to be seen in the map of the city.
In 1888, the War Department took control of a tract of land next to the bay, and added to it in 1897 and 1910. This became Fort MacArthur in 1914, and was a coastal defense site for many years. Many other facilities were established in the San Pedro area, and it was a popular port of call for US Navy ships.
The Los Angeles Maritime Museum, largest maritime museum in California, is here, as is the museum ship SS Lane Victory, a fully operational victory ship of World War II.