Niyoga (Sanskrit: नियोग) was an ancient Hindu practice. According to the Agni Purana, it referred to a system or custom that permitted either the husband or the wife who had no child by their spouse to procreate a child with another man or a woman. It became extinct after the Vedic period.