The Japanese attack on Pearl Harbor in December 1941 was not completely unexpected. The US government had been expecting some kind of attack for the previous two weeks, and all US commanders in the Pacific had been put on alert. However, Pearl Harbor was under defended due to measures taken to protect other bases. More than 180 US planes, 7 battleships and several other naval vessels were sunk or badly damaged. However, the audacity of the Japanese attack draws attention away from its limited effectiveness and US fighting power in the Pacific remained largely intact. A US declaration of war unsurprisingly followed; more of a surprise was the German and Italian declaration of war against the US a few days later, although Japan, Italy and Germany had been allies since 1937. The US had tremendous resources to fight the world war, but it took some time for the War Production Board, a government agency set up to oversee key industries, to mobilise these resources. Within two years, however, US output was enough to give the Allies a decisive advantage against the Axis powers.