In the 1045 attack (Battle of Dvin), Byzantine forces were under Constantine IX Monomachos. The Byzantines assembled a large force under the command of Michael Iasites and Constantine the Alan and allied with Armenians under the command of Vahram Pahlawuni and Liparit Orbelean.
To defend the city, Abu'l-Aswar flooded the surrounding fields, limiting the attacking army's mobility and causing it to fall victim to defenders' arrows.