Tokei-ji was founded in 1285 by a nun Kakusan ni, who was the widow of Hojo Tokimune (1251-1284), the regent of Kamakura Shogunate (1192-1333). It was originally a nunnery and it became a refuge for women who were abused by their husbands. As in those times women had no right to seek a divorce, Tokei-ji was designated by the Shogunate as a sanctuary for such women.
If a woman spent three calendar years in the temple, she was entitled to obtain a divorce from her husband. This is how the temple got its nickname the “Divorce Temple”. It served as Divorce Temple until the 19th century.