The continuing inability of the Abbasid army to suppress the revolt, caused in part by its preoccupation with fighting against the Saffarid Ya'qub ibn al-Layth's advance into al-Ahwaz and Iraq, eventually encouraged the Zanj to expand their activities to the north. A campaign by the rebels to occupy the marshlands between Basra and Wasit in 876 proved successful, and soon they made their way into the district of Kaskar. By 879, the rebellion reached its furthest extent. Wasit and Ramhurmuz were sacked and the rebels advanced northwest along the Tigris, coming to within fifty miles of Baghdad.