Juneau officially replaced Sitka as capital in 1900, but it did not begin to function as such until 1906. In the same year Alaska was finally awarded a territorial representative in Congress. A new era began for Alaska when local government was established in 1912 and it became a U.S. territory. The building of the Alaska RR from Seward to Fairbanks was commenced with government funds in 1915. Already, however, gold mining was dying out, and Alaska receded into one of its quiet periods. The fishing industry, which had gradually advanced during the gold era, became the major enterprise.
Alaska enjoyed an economic boom during World War II. The Alaska Highway was built, supplying a weak but much-needed link with the United States. After Japanese troops occupied the Aleutian islands of Attu and Kiska, U.S. forces prepared for a counterattack. Attu was retaken in May, 1943, after intense fighting, and the Japanese evacuated Kiska in August after intensive U.S. bombardments. Dutch Harbor became a major key in the U.S. defense system. The growth of air travel after the war, and the permanent military bases established in Alaska resulted in tremendous growth; between 1950 and 1960 the population nearly doubled.