Definition of the almoravid are a member of a Muslim dynasty of Berber warriors that flourished from 1049 to 1145 and that established political dominance over northwestern Africa and Spain .