Konjaku Monogatarishū
The early 12th-century "Konjaku Monogatarishū" "Collection of Tales About Times Now Past" gives this account.