The Banu Tujib (Arabic: بنو تجيب) or Tujibids were an Arab dynasty that were appointed to govern Calatayud in 872, and in 886 were given Zaragoza. This they held as governors (sometimes only nominally, carrying out their own foreign policy) under the Umayyads. The collapse of the Caliphate of Córdoba allowed them to found the Taifa of Zaragoza, which they ruled from 1018 until they were expelled by a rival dynasty, the Banu Hud, in 1039.  
In 934 Abd ar-Rahman III began a campaign in the north against Ramiro II of Leon and Muhammad ibn Hashim al-Tujibi, the governor of Zaragoza. The Tujibids had been governors of Zaragoza since the 800s. Refusing to submit to Abd ar-Rahman III, al-Tujibi formed an alliance with Ramiro II. Christian and Muslim sources portray this campaign in different ways. According to Ibn Hayyan, after inconclusively confronting al-Tujibi on the Ebro, Abd ar-Rahman briefly forced the Kingdom of Pamplona into submission, ravaged Castile and Alava, and met Ramiro II in an inconclusive battle. Ibn Hayyan, basing himself on Isa al-Razi, stated that al-Tujbi voluntarily sought an alliance with Ramiro II in order to avoid submitting to Abd ar-Rahman. According to Ibn Hayyan, Abd ar-Rahman negotiated a truce with Ramiro II in order to isolate al-Tujibi, and then forced al-Tujibi's surrender in 937. However, according to the Chronicle of Sampiro, in which al-Tujibi is called "Abohayha" (Abu Yahya), Ramiro II had attacked al-Tujibi and forced his submission, but once Abd ar-Rahman III arrived with his armies, al-Tujibi changed his allegiance to the Umayyads. In 939 Ramiro II met the combined Umayyad and Tujibid armies in the Battle of Simancas, defeating Abd ar-Rahman and capturing al-Tujibi in the process. Ibn Hayyan agrees that the Battle of Simancas was a defeat for the caliph.
In 941, Abd ar-Rahman III sent Hisdai ben Isaac ben Shaprut, his secretary and doctor, to negotiate a treaty with Ramiro II. Ben Shaprut secured al-Tujibi's release in this treaty. By 942, the Tujibids had been restored to the governorship of Zaragoza. Abd-ar-Rahman III sent Turkish slave soldiers from Cordoba to Zaragoza so that the Tujibids could deploy them against King Garcia Sanchez I of Navarre, who was allied to Ramiro II of Leon, Abd ar-Rahman's enemy. Ramiro II, in turn, sent forces to help Garcia Sanchez. However, Ibn Hayyan's history ends in that year, so these events are not known in as much detail as the previous campaigns of Abd ar-Rahman against Ramiro and al-Tujibi.
After Almanzor had consolidated his power in 983, he formed an alliance with the Tujibids of Zaragoza to be his military support. However in 989 one of Almanzor's sons conspired with the Tujibids against his elder brother, Tujibid leader, Abd ar-Rahman ibn Mut'arrif, joining a pact that would see the family control the marches of the Caliphate, but Almanzor learned of the plot and executed Abd ar-Rahman al-Tujibi as well as his own son. The caliph then deprived the Tujibids of their authority in the Ebro area, but they were soon restored in Zaragoza.
The family reached the pinnacle of their power with the disintegration of the Caliphate of Córdoba. When in 1018, the Berber Ali ibn Hammud al-Nasir, had himself elected caliph in place of the ruling Umayyad dynasty, the Tujibid governor of Zaragoza, Al-Mundhir ibn Yahya declared independence and established the Taifa of Zaragoza, in which he would be succeeded by his son, Yahya ibn al-Mundhir, and grandson, Al-Mundhir ibn Yahya. Following the death of the latter in 1038/9, a cousin, Abd Allah ibn al-Hakam al-Tujibi, succeeded but was expelled from Zaragoza by a rival dynasty, the Banu Hud, and the Banu Tujib passed into obscurity.
- John Middleton (1 June 2015). World Monarchies and Dynasties. Taylor & Francis. p. 925. ISBN 978-1-317-45157-0.
- William D. Phillips, Jr; Carla Rahn Phillips (1 July 2010). A Concise History of Spain. Cambridge University Press. p. 64. ISBN 978-0-521-60721-6.
- Rosamond McKitterick; David Abulafia (2004). David Luscombe, Jonathan Riley-Smith, ed. The New Cambridge Medieval History: Part II. c. 1024-c. 1198. Cambridge University Press. p. 157. ISBN 978-0-521-41411-1.
- Collins, Roger (2014). Caliphs and Kings: Spain, 796-1031 (Paperback ed.). Wiley Blackwell. p. 147.
- Collins, Roger (2014). Caliphs and Kings: Spain, 796-1031 (Paperback ed.). Wiley Blackwell. pp. 171–172.
- Collins, Roger (2014). Caliphs and Kings: Spain, 796-1031 (Paperback ed.). Wiley Blackwell. pp. 146–147.
- Collins, Roger (2014). Caliphs and Kings: Spain, 796-1031 (Paperback ed.). Wiley Blackwell. pp. 147–148.
- Collins, Roger (2014). Caliphs and Kings: Spain, 796-1031 (Paperback ed.). Wiley Blackwell. pp. 176–177.
- Collins, Roger (2014). Caliphs and Kings: Spain, 796-1031 (Paperback ed.). Wiley Blackwell. pp. 150–151.
- Collins, Roger (2014). Caliphs and Kings: Spain, 796-1031 (Paperback ed.). Wiley Blackwell. p. 188.