During the Sengoku period (c. 1467–1600), Japan saw an explosion of castle construction. Estimates suggest 30,000–40,000 castles and fortified residences existed at the peak. Most were small mountain forts (yamajiro) built by regional warlords (daimyo) for defense and status.
After unification under Tokugawa Ieyasu, the 1615 "One Castle per Domain" decree forced the demolition of most. Only ~170 major castles remained by the Edo period. Today, just 12 original main keeps (tenshu) survive (e.g., Himeji, Matsumoto).