Yuki Hideyasu built Fukui Castle in 1606 after he was given the territory of Kitanosho by Tokugawa Ieyasu after Hideyasu helped Ieyasu in the battle of Sekigahara. Hideyasu built the castle north of an older castle known as Kitanosho Castle. It was christened Fukui Castle by its next lord, Matsudaira Tadamasa, who became the lord of Kitanosho in 1624. The name comes from a well called Fukunoi, or good luck well, the remains of which can still be seen today. The tenshu, or keep, of the castle was destroyed by fire in 1669. What remained of the castle continued to be used until the Meiji Restoration, when all the buildings were torn down, leaving the stone walls and the lord's palace. In 1945, the palace was destroyed by United States Army Air Forcesfirebombing during World War II. Today, the castle is in ruins, and the prefectural government buildings stand on the grounds, though the palace was reconstructed in 1993.