Photographing flying birds is more about the preparation you put into making the picture happen than sheer luck. A combination of using the ideal settings while anticipating the right moment is essential to get a perfect shot like this.
I switched my camera to the Manual mode for a fast shutter speed and narrow aperture while setting up for this action shot. If you are using a compact camera, you can even use the Sports mode for similar settings. Instead of simply using a zoom lens from a single location, I decided to move closer to the birds. I used a wide focal length to include the monument and clear sky in the background.
If you are attempting to photograph something similar, make sure that spend a considerate amount of time scouting around the location for the best angle and to understand the flight patterns of the birds perfectly well. Also, be very careful so as to not disturb the birds and ruin the shot even before you get a chance to release the shutter.