 It is possible that Áed was still allied with Amlaíb at this point, and that the longphorts which were razed belonged to Vikings not affiliated with the Dubliners, but by 868 at the latest Amlaíb and Áed were at war.In 865 or 866 a battle was won by Flann mac Conaing, overking of Brega, against the Vikings, possibly in retaliation for the raids on his land by Amlaíb and his brothers in 863.Numerous further setbacks for the Vikings occurred in 866–867 when their camps at Cork and Youghal were destroyed, an army was routed in Kerry, two battles were lost against the native Irish in Leinster, and Amlaíb's fort at Clondalkin was destroyed.