The Battle of Leyte was the invasion and conquest of Leyte in the Philippines by American and Filipino guerrilla forces under the command of MacArthur. The U.S. forces fought Japanese Army forces led by General Tomoyuki Yamashita. The battle took place from 17 October to 31 December 1944 and launched the Philippines campaign of 1944–45, the goal of which was to recapture and liberate the entire Philippine Archipelago and to end almost three years of Japanese occupation. The 32nd was in reserve and was not deployed to Leyte until 14 November when it was assigned to the US X Corps. It relieved the 24th Infantry Division and went into action along the Pinamopoan-Ormoc highway, taking Limon and smashing the Yamashita line in bitter hand-to-hand combat. The division linked up with elements of the U.S. 1st Cavalry Division in the vicinity of Lonoy, on 22 December, marking the collapse of Japanese resistance in the upper Oromoc Valley. The division remained on the front lines until the Japanese resistance on Leyte was broken near the end of December.