Thanks!
It was luck. Well, mostly luck.
For flying birds, the settings I try to use are
o Shutter speed of at least 1/1000 sec, more likely at 1/2000 sec or even a bit faster, (1/4000 sec).
o Continuous autofocus
o Image stabilization on, with the particularity mode set for panning, if...