In 1310, however, the invasion under Malik Kafur overwhelmed the Hindu states of southern India in a common ruin. Though crushed, however, they were not extinguished; a period of anarchy followed, the struggle between the Chola kings and the Mussulmans issuing in the establishment at Kanchi of a usurping Hindu dynasty which ruled till the end of the 14th century, while in 1365 a branch of the Pandyas succeeded in re-establishing itself in part of the kingdom of Madura, where it survived till 1623.