"The work shows that religious conversions and subsequent marriages between people of different lines had a significant impact on modern populations both in the Balearic Islands and in Portugal," another author Elena Bosch said in a statement.
One of the most surprising findings is the percentage of Spaniards having genes similar to Sephardic Jews, although Spain had a relatively small Jewish population compared to its Moorish population.
This may arise because genetic features of Sephardic Jews used in the study are shared with other peoples such as neolithics and Phoenicians, so today's Spaniards could have inherited some of those genetics from various sources.
The Moors invaded the Iberian peninsula in 711 and remained until defeated in battle by the so-called Catholic Monarchs in 1492. Moorish influence is still very noticeable in Spain's language, architecture, music and other aspects of its culture.
Jews lived in Spain before the Moors arrived and although small in number played a significant cultural and economic role.
Hundreds of thousands of Jews were expelled from Spain in various repressive moves, started by the Catholic Monarchs. The study suggests many Jews converted rather than face repression.
Some Sephardic communities to this day speak Ladino, which is similar to medieval Spanish and can be understood by present-day Spaniards.