However, the city's prosperity was almost ended when it was captured by the Japanese in 1941, before being recaptured by the Allied forces in 1945. During the war, most infrastructure was destroyed by Japanese and Allied bombing. The British began reconstructing most of their possessions in Borneo at the end of 1945 with the restoration of law and order and the reopening of schools.