The Battle of Beaufort took place during the Second World War between Allied and Japanese forces. Part of the wider Borneo campaign of the Pacific War, it was fought between 26 and 28 June 1945 in North Borneo (later known as Sabah). The battle formed part of the Allied efforts to secure North Borneo in the final months of the war and saw two Australian infantry battalions attack the town, which was held by a force of around 800 – 1,000 Japanese. Over the course of several days heavy fighting took place before the Japanese began withdrawing on 29 June. While withdrawing, the Japanese were ambushed and suffered heavy casualties.