At last he succeeded by diverting their attention toward attacking the deputies, in getting control of them, and the danger was avoided.
Ultimately, he averted a crisis by diverting their attention from the deputies and securing control over them.