The Battle of al-Mada'in was fought near al-Mada'in in central Iraq between the armies of the Hamdanids and the Baridis, for control over Baghdad, the capital and seat of the Abbasid Caliphate that was around 22 kilometers away.