Joshua attacked them by surprise after marching all night from Gilgal.
Joshua and his whole army caught them by surprise at the Waters of Merom and attacked them.