The Emir and Caliph of Córdoba, Abd-ar-Rahman III of the Ummayads was the most powerful Spanish prince of his day. When he ascended power in 912, he inherited a city greatly reduced in power. Reigning for 50 years, he not only took back lost territories but quenched a number of rebellions, repelled attacks from Christian and Muslim kingdoms surrounding him, consolidating his power on the Iberian peninsula. When in 929 he declared himself Caliph, a title previously only to be held by the princes of Mecca and Medina, he effectively broke ties with the two other great Islamic dynasties and improving his prestige among his subjects in Spain and North Africa.
Under his rule, Córdoba became the largest city in Europe, and certainly the most enlightened. Religious diversity was tolerated, and medicine and medical researched reached a peak at this time, with advances in surgery and knowledge of the function of the eye, for example.
Abd-ar-Rahman III also openly kept two harems: one of women and one of men. A tale of a boy who refused his advances and was put to death was likely made up after his death in a (successful) attempt at demonizing the Moors during the time they were driven out of Spain.
Abd-ar-Rahman III has a page on wikipedia, here.