"Kugatachi" (also known as kukatachi and kukadachi) refers to trials by ordeal held in ancient Japan. It was a spiritual trial (by ordeal) used to judge if a person was right or wrong. It can be written 盟神探湯, 探湯 and 誓湯.
The accused was ordered to swear his innocence before the gods, and then made to put his hand into a pot of boiling water. It was said that an innocent person would be unharmed but a guilty person would be badly scalded. A similar trial has the accused putting his hand into a pot containing a poisonous snake, with an innocent person remaining unharmed. It was a kind of divination with the expected result being shown to the gods in advance and then the judgment was based on the actual result.
Similar trials by ordeal were also held in Europe.
Records in Nihonshoki (Chronicles of Japan)
The entry for April, 278, records that TAKENOUCHI no Sukune, who was about to be killed after being falsely charged by his brother, UMASHIUCHI no Sukune, insisted on his innocence, and therefore the Emperor held a kugatachi for them at Shiki-gawa River. In the entry for September, 415, it is recorded that as the social order broke down, some people lost their old kabane (hereditary title) or intentionally adopted uji (family names) of higher ranks. In order to amend the situation, a kugatachi was held at Amakashi no oka Hill. After bathing for purification, each person tied up the sleeves of their kimonos and underwent kugatachi. Because people with the right kabane didn't get scalded but all people with false kabane did, those who were lying and hadn't had their turn yet were too afraid to go forward. Therefore it was immediately known who was innocent and who was guilty.
A note on the entry records that the specific procedure is to 'put mud into an iron pot and boil it, then put your hand into the pot and search the mud.'
In the entry for September, 530, it is recorded that lawsuits between people from Mimana (on the Korean peninsula) and Japan that could not be decided were settled by kugatachi.
There are no records about kugatachi for the next 900 years. It is unknown if trials by kugatachi were not held or were continuously held in secret during this period.
However they reappear in records during the Oei era in the Muromachi period. During this period, the practice was known as yugisho (testimony by boiling water). In particular, Shogun Yoshimasa ASHIKAGA often used kugatachi for political trials. But they disappeared from the records again after that.
It was completely without scientific and rational basis but, for people in earlier times, it was effective to some extent, instilling fear in suspects and making them confess their crimes.
After the end of the use of kugatachi as a trial by ordeal, the term came to signify the hot water used to purify the body when worshipping before the gods. Shinto rituals such as yudate (a rite where water boiled in an iron pot is applied to worshipers using bamboo leaves) and yugisho (testimony by boiling water) originated from this sense of kugatachi.