The Commonwealth of the Philippines was attacked by the Empire of Japan on 8 December 1941, nine hours after the attack on Pearl Harbor (the Philippines is on the Asian side of the international date line). Although it was governed by a semi-independent commonwealth government, the United States of America controlled the Philippines at the time and possessed important military bases there. The combined American-Filipino army was defeated in the Battle of Bataan and the Battle of Corregidor in April 1942, but guerrilla resistance against the Japanese continued throughout the war. Uncaptured Filipino army units, a communist insurgency, and supporting American agents all played a role in the resistance. Due to the huge number of islands, the Japanese never occupied many of the smaller and more minor islands. Japanese control over the countryside and smaller towns was often tenuous at best.