The conflict first emerged among the Arab tribes that constituted the Umayyad army and administration in the 7th and 8th centuries. Membership in either faction was rooted in the genealogical origins, real or perceived, of the Arab tribes, which divided them into south Arabian descendants of Qahtan (Yaman) or north Arabian descendants of Adnan (Qays). Yamani tribes, including the Kalb, Ghassan, Tanukh, Judham and Lakhm, were well-established in central and southern Syria in pre-Islamic times, while Qaysi tribes, such as the Sulaym, Kilab and Uqayl, largely migrated to northern Syria and Upper Mesopotamia with the Muslim armies in the mid-7th century.
The Qays–Yaman feud did not effectively take shape until after the reign of Caliph Mu'awiyah I, 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 Yaman resolved to ensure continued Umayyad rule so as to maintain their stately privileges, while the Qays backed Abdullah ibn Zubayr's bid for the caliphate. That year, the Yaman 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.
By 693, the ayyam largely subsided as the Qays reconciled with the Umayyads and were incorporated into the state. Umayyad caliphs attempted to balance the powers and privileges of both factions, but the rivalry smoldered until the Third Muslim Civil War, in which the Yaman killed Caliph Walid II for his dependence on the Qays. Yamani opposition continued under Caliph Marwan II, and the Yaman ultimately defected to the Abbasids when the latter conquered the Umayyad realm in 750. The Yaman and Qays briefly joined forces against the Abbasids later that year, but were defeated. The Qays–Yaman rivalry diminished significantly under the Abbasids who, unlike the Umayyads, did not derive the bulk of their military support from either faction. Nonetheless, the feud persisted at the local level to varying degrees in the following centuries, which saw occasional outbreaks of Qaysi–Yamani violence.
During the Ottoman era, between the 16th and mid-19th centuries, the rivalry saw a resurgence in Mount Lebanon and Palestine, and affiliation with either faction transcended ethnicity and religion and was made by families with little consideration to genuine tribal lineage. In Mount Lebanon, the feud was mostly fought out between different Druze clans until the Battle of Ain Dara in 1711 led to the near complete exodus of Yamani Druze. Across Palestine, the rivalry encompassed Bedouin tribesmen, peasant clans and townsfolk. Most actual fighting took place in Nablus and its hinterland and the area around Jerusalem. The feud gradually dissipated with the growth of Ottoman centralization in the mid-19th century.
The ancient origins of the Qays–Yaman division were traditionally based on an Arab tribe's northern or southern Arabian roots, real or perceived; the Qays were from northern Arabia, while the Yaman were from southern Arabia. Genealogically, the northern tribes were traditionally said to descend from Ishmael while the southern tribes were said to descend from Qahtan. Historical Arab sources sometimes referred to the southern Arabs as Qahtāniyya (Qahtanites), but more often called them ahl al-Yaman (people of Yemen) or al-Yamāniyya (Yemenites). By contrast, northern Arabs were seldom referred to as "Ishmaelites", possibly because that term came to refer to Arabs in general. Rather, the northerners were described as Adnanites after Adnan, a distant descendant of Ishmael, or called after one of the descendants of Adnan, namely his son Nizar (Nizāriyya), the latter's son Mudar (Muḍariyya), or one of Mudar's descendants, Qays (Qaysiyya). Moreover, not all of the northern Arabs came under the labels "Mudar" or "Qays"; the Rabi'ah, whose traditional homeland was eastern Arabia, also traced their descent to Nizar. However, regardless of their northern ancestry, the Rabi'ah's allegiance vacillated between Qays/Mudar and Yaman, and historical Arab sources often referred to them as a third party to the Qays–Yaman feud.