During World War II, the United States captured Palau from Japan in 1944 after the costly Battle of Peleliu, when more than 2,000 Americans and 10,000 Japanese were killed. In 1945–1946, the United States re-established control on the Philippines, and managed Palau through the Philippine capital of Manila. By the later half of 1946, however, the Philippines was granted full independence with the formation of the Third Republic of the Philippines, shifting the US Far West Pacific capital to Guam. Palau passed formally to the United States under United Nations auspices in 1947 as part of the Trust Territory of the Pacific Islands established pursuant to Security Council Resolution 21.