Banu Dānis
The Banū Dānis (), also known as "Banū Abī Dānis" or "Banū Adānis", were a clan of the Berber tribe of Awsāǧa (also Awsaŷa, 'Awsaja, Aussaya). The 'Awsāǧa, in turn, belonged to the tribal confederation of Masmuda (according to other sources, to the Malzūza). They had come at the beginning of the 8th century during the Islamic expansion with a first Berber immigration from North Africa to the Iberian Peninsula and played until the second Berber immigration late 10th century a leading role in the west of al-Andalus, today's southern and central Portugal. Masmuda Berbers had settled  between the rivers Tejo and Douro or in the entire area between Beja and Coimbra. The Banu Dānis settled on the banks of the Sado (near Alcácer do Sal); in Coimbra, in turn, they were next to Mozarabs the largest population group. Also in Lisbon there were Banu Dānis or Masmuda - as well in Porto (Oporto). The power and influence of the Banū Dānis increased when, after the Viking raids in the mid-9th century, the Umayyad Emirate of Córdoba developed the port cities on the Atlantic coast into important fortresses, the Banū Dānis became governors of Alcácer and Coimbra. During  the rebellions erupting at the end of the 9th century, the Banū Dānis remained loyal to the Umayyads. However, the Mozarabs of Coimbra allied themselves with the Muladí rebels Sāʿḍūn al-Ṣurunbāqī and Ibn Marwan; after fierce battles led by Adānis Ibn 'Awsāǧa, Banu Dānis were expelled from Coimbra in 876. The city then fell to Alfonso III of Asturias. The expelled Banu Dānis withdrew in 877 first to Lisbon, then to Alcácer do Sal (al-Kasr Abī Dānis, i.e. "castle of Banū Abī Dānis"). Then, in 888, they also revolted against the usurpation of the throne by the Emir  Abdullah ibn Muhammad al-Umawi (as did the Banū Khalī, another clan of 'Awsāǧa, who rose in the south of Andalusia and joined the rebellion of Umar ibn Hafsun). From Alcácer do Sal, the Banū Dānis under Adānis' son Mas'ūd Ibn Abī Dānis (Mas'ūd Ibn Adānis) were able to expand their power and extend it again over Lisbon. Far away from Córdoba they dominated in the meantime at least the entire Estremadura or approximately the area of today's districts Lisbon and Setúbal. After the suppression of the rebellions, the Banū Dānis were appointed as governors by the caliph Abd  al-Rahman III: Mas'ūd's brother Yaḥyā Ibn Abī Dānis (Yaḥyā Ibn Adānis) became governor of Alcácer in 930 and his nephew 'Abd Allāh Ibn' Umar Ibn Abī Dānis became governor of Palmela or Setúbal. Almanzor eventually dismissed the Banū Dānis governors, and made Alcácer do Sal a base for campaigns to the north, in which 987 Coimbra was recaptured.