When Kaykhusraw III was executed in 1284, the Seljuq dynasty suffered another blow from internal struggles which lasted until 1303 when the son of Kaykaus II, Mesud II, established himself as sultan in Kayseri.