The Commonwealth era in the Philippines ended when the country was occupied by Japan in 1942. The Commonwealth government fled into exile in the US, while Japan installed a puppet government headed by Jose Laurel. In 1944, US forces led by General MacArthur liberated the Philippines from Japan. After the war, the Commonwealth was restored and held elections, with Manuel Roxas becoming the last Commonwealth president before independence was granted on July 4, 1946 as scheduled.