Filters:
Topic: Khmer-Thai Wars of c. 1352-1444
Location: San Marino San Marino

Rafi ibn Harthama had originally served the …

Years: 886 - 886

Rafi ibn Harthama had originally served the Tahirid dynasty, which controlled Khurasan as virtual viceroys in the name of the Abbasid Caliphate.

Tahirid (and implicitly also Abbasid) control of Khurasan had been challenged in the 860s by the revolt of Ya'qub al-Saffar, who, beginning from his home province of Sistan, had defeated the Tahirid armies and by 873 had seized the provincial capital, Nishapur.

The failure of Ya'qub to seize Baghdad in 876, however, and his death soon after had weakened the Saffarid regime that his brother Amr ibn al-Layth had inherited.

With the Saffarids engaged elsewhere, and their takeover of the former Tahirid domains condemned as illegal by the Abbasid government, Nishapur had been seized in 875 by an anti-Saffarid faction under Ahmad ibn Abdallah al-Khujistani, a former Tahirid soldier.

After his murder in 882, Rafi, who had risen to be his commander-in-chief, had been acclaimed by al-Khujistani's army as his successor.

Rafi had faced the opposition of the Saffarids under Amr, who had made his peace with the caliph in 879 and been recognized as governor of Khurasan and most of Iran, as well as the adventurer Abu Talha Mansur ibn Sharkab, who had briefly seized Nishapur in 876–878 and was now ruler of Merv.

Defeated, Abu Talha soon sought Samanid and Saffarid aid, and in 885 he had been appointed as the Saffarid deputy for Khurasan, while Amr turns again west to confront the attempts of the Abbasid regent, al-Muwaffaq, to recover Fars.

Rafi's fortunes change at this point, as al-Muwaffaq strips the Saffarids of their governorships, and confers Khurasan on Rafi.

Rafi is now able to secure an alliance with the Samanids of Transoxiana and neutralize Abu Talha, seizing Merv and Herat.

He raids as far as Khwarezm in 886 and aids the Samanid Isma'il ibn Ahmad against his brother Nasr I.