The Elamites conquered Babylonia in the 12th century , thus ending the Kassite state. The last Kassite king, Enlil-nadin-ahi, was taken to Susa and imprisoned there, where he died. However, Kassites survived as a distinct ethnic group in the mountains of Lorestan long after the Kassite state collapsed.