 After the coronation, Pedro and Diego gathered an army to subject Galicia to his rule, first attacking Lugo, which was still loyal to Alfonso the Battler.They captured it and probably left a detachment there before crossing the mountains in the direction of the capital, León.They were ambushed about twenty miles from the city by Alfonso and defeated in the Battle of Viadangos, whereat Pedro was captured.