but that further history was of cardinal importance in the ancient legends , for the concluding stories ( deriving from the original book of lost tales ) told of the disastrous history of hurin , father of turin , after morgoth released him , and of the ruin of the elvish kingdoms of nargothrond , doriath , and gondolin , of which gimli chanted in the mines of moria many thousands of years afterwards .