During the Edo period, when a head of a samurai family, without a son to carry on the family name, was on his deathbed due to an accident or disease, a son was urgently adopted in order to prevent the extinction of the family name.
末期養子（まつごようし）とは、江戸時代、武家の当主で嗣子のない者が事故・急病などで死に瀕した場合に、家の断絶を防ぐために緊急に養子縁組をした。