Question: who is the last ruler of ummayed dynasty
Answer: an II 822 -- 852 Muhammad I 852 -- 886 Al - Mundhir 886 -- 888 Abdallah ibn Muhammad 888 -- 912 Abd ar - Rahman III 912 -- 929 Caliphs of Cordoba Abd ar - Rahman III , as caliph 929 -- 961 Al - Hakam II 961 -- 976 Hisham II 976 -- 1008 Muhammad II 1008 -- 1009 Sulayman ibn al - Hakam 1009 -- 1010 Hisham II , restored 1010 -- 1012 Sulayman ibn al - Hakam , restored 1012 -- 1017 al - Mu'ayti , rival in Denia 1014 -- 1016 Abd ar - Rahman IV 1021 -- 1022 Abd ar - Rahman V 1022 -- 1023 Muhammad III 1023 -- 1024 Hisham III 1027 -- 1031