The two Muslim dynasties would rule Valencia for more than a century.