California had close ties to the military throughout the 19th century after being seized by the U.S. in the Mexican-American War of 1846. In the early 1900s, the U.S. Navy established its Pacific Fleet in San Diego and tensions rose with Japanese immigrants in California. During World War 2, which began with Germany's invasion of Poland in 1939, the Pearl Harbor attack in 1941 drew the U.S. into the war and California's Bay Area became a major military center for the Pacific theater.