The U.S. since last year has been secretly flying unmanned surveillance aircraft in small numbers over Iraq to collect intelligence on insurgents, according to U.S. officials.

The program was limited in size and proved little use to U.S. and Iraqi officials when Islamist fighters moved swiftly this week to seize two major Iraqi cities, the officials said.

Before the Islamist offensive, the program was expanded based on growing U.S. and Iraqi concerns about the expanded military activities of al Qaeda-linked fighters.

Officials wouldn't say what types of drones were being used but said the flights were conducted only for surveillance purposes. The program was launched with the consent of the Iraqi government.

A senior U.S. official said the intelligence collected under the small program was shared with Iraqi forces, but added: "It's not like it did any good." The rapid territorial gains by the Islamist forces loyal to Islamic State of Iraq and al-Sham, or ISIS, an al Qaeda offshoot, caught the U.S. by surprise, the officials said.