Himeji was the site of capital of Harima province in the ancient time. Himeji Castle started out as a fortress built in town during this time. Some theories hold the castle construction dates back to the 14th century, but it is generally consider to have been built by Kuroda Shidekada in the mid-16th century.
The castle was ruled by a succession of feudal lords from various clans, including the Matsudaira and Sakakibara clans, and fell under the Sakai clan at the time Japans' feudal domains were replaced by prefectures.
Having been transformed from a castle town to a military town, Himeji was twice targeted by air raids during the Second World War, but fortunately Himeji Castle's historic buildings escaped major damage