Unlike the typical Western castles seen throughout Europe, the Japanese castles did not favor a citadel-like structure. They may look entirely different, but the castles of the wealthy were built for pretty much the same purposes: a lavish home that offered protection, and place from which its lords could influence the surrounding countryside.

The first Japanese castles appeared in the 15th century as the country was undergoing one of its rare periods of turmoil. In the proceeding centuries, the castles were built either as governing centers or to simply house a feudal lord. At the peak of the trend, it is considered that more than 5,000 castles dotted the landscape of the Far East island country, but today’s survivors total in the dozens.

Traditionally constructed of stone and wood, the Japanese castles contain architectural features that are striking, unlike anything else seen in the world. It is widely agreed that one of the most impressive of all is the Himeji Castle. Located in Kobe, this fortification is noted for its beautiful white towers. The entire complex is perched atop a hill and is composed of as many as 83 distinct structures, many of which are connected to each other by corridors. Its main keep is six stories tall, and it can be spotted from almost any location in the surrounding city of Himeji.

Other castles may look less spectacular than Himeji Castle, but that doesn’t mean they lack original architectural features. Which leads us to Nijō Castle, a large fortification situated in the former Japanese capital of Kyoto. This castle is known for having perhaps the best example of the Japanese Nightingale flooring system, which was specially designed to catch uninvited guests penetrating the castle’s boundaries.

The authentic flooring system functioned as an automatic intruder alarm, which was certainly a greatly welcomed invention during the Edo period in Japan, spanning from the beginning of the 17th century until somewhere in the late 1860s. This was an epoch marked by a partially feudalistic system, during which regional Lords known as Daimyo had the privilege to administrate and control lands of their own, and they also used private armies for protection.

As the Daimyo was a person of power, he naturally would have enemies. And in those times in Japan, the most efficient way to deal with your enemies was to hire a ninja assassin. Japanese ninjas were notoriously unstoppable, seeming to have the “super powers” to attack any target and get away from the scene of the crime with the flick of a finger.

Created by the best craftsmen and carpenters from around the country, Nightingale floors, or “uguisubari,” which translates as “bush warbler guard watch,” are designed in such a way as to make a sound similar to a bird’s chirping when somebody starts walking on it. With just the lightest step, the floorboards bend enough to cause the flooring nails to rub against a clamp, producing a clearly audible sound. The songbird-like creaking is not very loud but is certainly enough to shatter a night-time silence, warning any guard that danger is approaching and forcing a ninja to abandon his plots for the night.

During the Edo period, Nijō Castle was the seat of power in Japan, visited by numerous Daimyo as well as prominent military commanders known as Shogun. To ensure that all guests are safe and sound, the nightingale floors were installed at several points inside the castle, with some rooms also integrating secretive places where personal bodyguards of prominent visitors were able to lie down and see if any attacker dared to disturb the night. The Nijō Castle nightingale floors can still produce the chirping sound, but now serve as an attraction for visitors and tourists.

Here is another story from us: The Romans are credited with the invention of the first underfloor heating system

As it was a good method for helping a guard pinpoint the exact location of any trespasser, Nightingale floors soon started being used not only for castles but also for treasured temples. Besides Nijō Castle, other examples of such floors still exist today in the interiors of the Shingon Buddhist temple Daikaku-Ji, in Kyoto, and the Chion-in temple in Higashiyama-Ki.