The Battle of Alhandic is fought between Ramiro II of León and Abd-ar-Rahman III at Zamora in the context of the Spanish Reconquista. The battle resulted in a victory for the Emirate of Córdoba.

The Battle of Alhandic (Spanish: Batalla de Alhandic), also known as Zamora's trench Battle (Batalla del Foso de Zamora), was a battle that occurred on 5 August 939 in the city of Zamora, Spain. The battle occurred when the troops of Abd-ar-Rahman III assaulted the walls of Zamora. The defending troops were those loyal to Ramiro II, King of León. The fighting was so bloody that the tide of the battle did not turn until the ditch surrounding the city walls was entirely filled with corpses. The troops of Aberraman III won the day and were able to seize the city of Zamora. This battle should not be confused with the Day of Zamora (Día de Zamora or Jornada del Foso de Zamora) which took place a few decades before in the year 901.