The Qays–Yaman rivalry refers to the rivalry between the tribal factions of Qays–Mudar and the Yaman. The history of the rivalry centers mainly within the armies and administrations of the Umayyad Caliphate in the 7th and 8th centuries, but persisted to varying degrees among the Arabs through Ottoman rule (1517–1918). Membership in either faction was rooted in the genealogical origins of the tribes, real or perceived, which divided them into south Arabian descendants of Qahtan (the Yaman) or north Arabian descendants of Adnan (Qays–Mudar).
The tribes which constituted the Yaman, most prominently the Kalb, Ghassanids, Tanukh and Judham, were well-established throughout the Syria (the Levant) since the pre-Islamic period, while the Qaysi tribes, namely the Sulaym, Banu Amir and Ghatafan migrated to northern Syria and Upper Mesopotamia with the Muslim armies in the 7th century. The feud did not effectively take shape until after the reign of Caliph Mu'awiya I (r. 661–680), who, along with his Sufyanid descendants, were tied to the Kalb, the leading tribe of Yaman, through marriage and military dependence. When the last Sufyanid caliph died in 684, the Kalb and its allies resolved to ensure continued Umayyad rule to maintain their stately privileges, while the Qays backed Abd Allah ibn al-Zubayr's bid for the caliphate. That year, the Kalb routed the Qays at the Battle of Marj Rahit, leading to years of revenge-driven, tit-for-tat raids known as ayyam (days) because the battles were typically day-long affairs.