Kuikaeshi is an act in which, after a property's ownership was shifted to someone else by compromise or donation, its previous owner or his descendants recover the ownership by disaffirming the previous decision.
The common theory is that, under the Kugeho (laws issued by the imperial court) in the Heian period, Kuikaeshi was not allowed at any time; but another theory (by Takao NAGAMATA, etc) insists that when a crime corresponding to disinheritance of Ritsuryoho (Ritsuryo law), such as disobeying rules and being undutiful, was found in the descendants, Kuikaeshi was allowed by 'Kojo Yuko setsu' (current status has a priority to the past). In the Kamakura period, although Kuikaeshi against the descendants were allowed in some cases even in the Kugeho, there were some severe restrictions such as no Kuikaeshi was allowed against properties handed to married women who were not under their parents' protection; and especially when the previous owner or the descendants who received it by compromise gave it to a third person (compromise to a non-blood relative), no Kuikaeshi was allowed.
However, in the Bukeho (the law system for the samurai society and the military government), from the view of attaching some additional weight to the heirs' parental power, Kuikaeshi was widely allowed unless it was donated to a temple and shrine. According to Goseibai-shikimoku (code of conduct for samurai), there was nothing to stop Kuikaeshi against properties given to their children from parents and this was the same when it was given to daughters; and even if it was a property guaranteed with an Andokudashibumi from the Kamakura Shogunate, they were not to be an exception.
(For Kuikaeshi against Sotomago [grandchild from a daughter married into another family], although it says that Kuikaeshi was allowed according as daughters, in reality, if there was an issue raised, it had to be judged by checking the deed and the shoryo [territory] to avoid confrontation against the family of the Sotomago.)
In 1267, compromise to a third person (compromise to a non-blood relative) which could not be the subject of Kuikaeshi was banned and before this Kuikaeshi against an ex-wife who a husband gave property to then divorced was not allowed unless she was a criminal, but it was changed to allow Kuikaeshi against ex-wife who married again. Also, when Goseibai-shikimoku was established, the Kuikaeshi against brothers and cousins were not allowed as well as the cases of a compromise with a third person (same as in Kugeho), but in 1240, when the person who received the property from the previous owner for treating the owner's parents well or from patronage became hostile against the owner, it was to be the subject for Kuikaeshi; and in 1290, all Kuikaeshi against brothers and cousins became legal. However, when people were planning to carry out a Kuikaeshi against brothers and cousins, not their own children and grandchildren, they needed permission from the Shogunate to use the right. In 1243, when Nagayori SAGARA conducted a Kuikaeshi against the property which was given to his brother's son but had permission from his brother to get it back before his brother's death, he lost a part of the property because he did it without the shogunal permission. Although Kuikaeshi by parents did not have any restrictions, to prevent complications afterward, there were cases to include the conditions for Kuikaeshi in the letter of transfer or disposition which was created when the share of the property was decided. It is thought that even when parents used their right of Kuikaeshi, they were obliged to report to the Shogunate afterward.
These rules were set because, for Gokeninyaku (the posts of retainers), the task the Shogunate set to Gokenin (vassals), to be carried out smoothly, the strong connection of the family toward the heir and assurance of financial base were necessary; and for this, the Shogunate needed to minimize the Gokenin's impoverishment from property dispersion by strengthening the power of the heirs.
When the period of the Northern and Southern Courts began, Kuikaeshi was widely allowed in Kugeho as in Bukeho. This was mainly because of the change of the nature of inheritance for Kuge (Court Nobles) families, as in Samurai families, to avoid property dispersion and limit the inheritance only to the legitimate children. As for donations to temples and shrines, there was a strong insistence that there was no base for taking back the gifts to the Shinto and Buddhist deities from the temples and shrines; and it was established, as a Daiho (great traditions of Esoteric practices) of the Medieval Period of Japan, that these donation were not to be subject to Kuikaeshi.