It was ruled by the MISC@1 dynasty of caliphs , who built their capital in LOCATION@1 after overthrowing the MISC@2 caliphs from all but PERSON@1 .

It overthrew the MISC@2 caliphs from all but LOCATION@2 .
