Badr al-Hammami mentioned by al-Tabari. This success was soon followed by the decisive victory of the Abbasid army at the Battle of Hama in November, which led to the capture and execution of Husayn and the senior Qarmatian leaders. In autumn 904, the Abbasids under Muhammad ibn Sulayman al-Katib launched a campaign to recover Egypt and end the Tulunid regime. When Muhammad arrived at the borders of Egypt in November, Badr went over to him. The defection of the most senior commander was soon followed by other Tulunid officers, and when Harun ibn Khumarawayh was killed by one of his own men,
Army of the North victory. The battle was favorable to Balcarce even though he again had numerical inferiority (800 royalist against 600 rebels, and in Cotagaita 2,000 royalists against 1,100 rebels). Balcarce earned the rank of brigadier, and the confidence to advance towards the Desaguadero River, border of the viceroyalty in colonial times. Due to internal disagreements Castelli had to dismiss Güemes and his gaucho soldiers. The royalist defenses were left in charge of general José Manuel de Goyeneche, who met with Castelli and signed an armistice to last for forty days from 16 May. The army moved from the encampment at La Laja,