The answer is Christianity. This was affected by groups of immigrations that integrated and combined with the residents, going to a jumble combination of laws and civilizations. Catholic Christianity did achieve to survive through the period, and did its best to reserve the ancient knowledge, and then improve it.