Ki castle

Ki castle (鬼ノ城) was an ancient  kōgoishi type castle (also known as a Korean-style fortresses in Japan (朝鮮式山城) located in the city of Sōja, Okayama Prefecture, Japan.  Its ruins have been protected as a National Historic Site since 1986.  Portions of the castle were reconstructed in the early 2000s.

Legend
The castle's name literally means "demon castle" (ki is another reading for the character for oni); according to a traditional fable, a demon named Onra or Ura once ruled Kibi Province from the castle. The castle is the basis of the myth that is associated with the folklore hero, Momotarō. The legendary story of Kibitsuhiko-no-mikoto and Ura explains that the Prince Ura of Kudara used to live in Ki-no-jo (castle of the devil) and was a cause of trouble for the people living in the village. The emperor's government sent Kibitsuhiko-no-mikoto (Momotarō) to defeat Ura. However, "Ki means "castle in the ancient language of Baekje, and was later simply assigned the kanji character for "demon''. "Ki-no-jō" is a name that combines the two words for "castle".

History
After the defeat of the combined Baekje and Yamato Japan forces, at the hands of the Silla and Tang China alliance at the Battle of Hakusukinoe in 663, the Yamato court feared an invasion from either or both Tang or Silla. In response, Emperor Tenji ordered the construction of a huge network of shore fortifications throughout the rest of the 600s, often with the assistance of Baekje engineers, generals and artisans. Unaware of the outbreak of the Silla-Tang War (670–76), the Japanese would continue to build fortifications until 701, after finding out that Silla was no longer friendly with Tang. According to the Nihonshoki, twelve Korean-style mountain fortifications were built in western Japan at this time, and it is believed that Ki castle was one of them. The identification of particular sites with the fortresses constructed at this time remains a subject of debate, and most fortifications of this period are classified under the wider term kōgoishi (神籠石).

Ki Castle is not mentioned in any historical documents, and the year of its construction is unknown, but archaeological excavations show that it was built in the latter half of the 7th century. The caste is situated at the southern end of the Kibi plateau and encompasses the summit of a mountain near the center of ancient Kibi Province. A wall made of stone and earthen ramparts with four gates, corner towers and six water gates, stretches for 2.8 kilometers. The area inside the wall is about 30 hectares. The discovery of paving stones to protect the castle walls was the first of its kind in Japan. Within the castle, the foundation stones for seven buildings, one raised pillar building, a reservoir and well, twelve forges and blacksmith workshop remains have been confirmed. While many of the contemporary kōgoishi fortifications appear to have been left unfinished, Ki Castle is equipped with most of the facilities necessary for a mountain castle, indicating its importance.

The location of the castle overlooks the Seto Inland Sea, which was the main sea route for international exchange and trade and was therefore also the main route for an invader. Yashima Castle in Kiyama Castle, contemporary fortifications on the island of Shikoku are within the field of view of Ki Castle.

Rammed earthworks measuring 7 meters wide and 6–7 meters high account for more than 80% of the castle walls. However, 1.5 meter wide paving stones are laid on the inside and outside of the bottom of the castle wall, giving it a strong atmosphere. The two overhangs on the front of the defenses are built with stone walls. Water gates to prevent the walls from collapsing due to running water are concentrated on the defensive front. There are four sluice gates, with stone walls built 2 to 3 meters below the castle walls to provide water inlets, and earthworks on the tops of the water channels. The other two are percolation gates that allow water to flow naturally between the stone walls. In addition, embankment-like remains were excavated in two valleys on the castle side of the water gate to protect the castle walls from debris flows and running water and to secure water.

There were four castle gates: the east, south, and west gates on the front of the defenses, and the north gate on the back of the defenses. The main entrance is the west gate, and it was protected by a corner tower. There is also a rammed-earth mound measuring about 300 meters in length, about 3 meters in height, and about 21 meters in width at the base located in the rural area where the low hills at the southern foot of Ki Castle protrude from the north and south. It is also believed to have been the site of a secondary fortification intended to protect the approach road to the castle.

From the bottom of the wall many wooden products were unearthed, as well as Sue ware and Haji ware pottery, inkstones, whetstones, nails and other ironware. Relics related to Buddhism, such as tiled pagodas, water vases, and vessels, have been unearthed around the foundations of the buildings on the summit of the mountain. From these relics, it was determined that a Buddhist temple was constructed on the site from the Asuka period to the Heian period after Ki Castle was abandoned as a fortification.

In 1978, the first full-scale archaeological survey of the remains was undertaken. From the findings of this examination and excavated artifacts, it is believed that the castle was constructed in the Asuka period and was in operation for only a short time, from around the fourth quarter of the 7th century to the beginning of the 8th century, although it is also possible that the castle was built as early as 667 AD. Ki Castle was listed as one of Japan's Top 100 Castles by the Japan Castle Foundation in 2006.