U.S. officials said Syria launched airstrikes into western Iraq on Tuesday in an attempt to slow insurgents fighting both the Syrian and Iraqi governments.

Officials said Wednesday the strikes were the work of Syrian President Bashar Assad's government, which is locked in a bloody civil war with opposition groups. The target of the attacks was the extremist group Islamic State of Iraq and Syria (ISIS), which has been fighting along with the rebels opposed to Assad and since has moved swiftly across the border into Iraq.

The White House said intervention by Syria was not the way to stem the insurgents, who have taken control of several cities in northern and western Iraq.

"The solution to the threat confronting Iraq is not the intervention of the Assad regime, which allowed (ISIS) to thrive in the first place," said Bernadette Meehan, a National Security Council spokeswoman.

"The solution to Iraq's security challenge does not involve militias or the murderous Assad regime, but the strengthening of the Iraqi security forces to combat threats."

Two U.S. officials said Iran has been flying surveillance drones in Iraq, controlling them from an airfield in Baghdad. Officials said they believe the drones are equipped for surveillance only, but they could not rule out that the drones may be armed. The officials spoke only on grounds of anonymity because they weren't authorized to discuss the issue publicly by name.

Pentagon officials have said a number of Iranian commanders and operatives had moved into Iraq in recent weeks when the insurgency began to get a foothold.

In an unusual twist for the long-time foes, the U.S. and Iran find themselves with an overlapping interest in stabilizing Iraq's government. However, while Iran wants to preserve Shia control of Iraq's government, the U.S. is pressing leaders in Baghdad to create a more inclusive political system.

U.S. and Iranian officials have had some direct discussions on the matter, though the Obama administration has ruled out the prospect of direct military involvement.

The U.S. is also conducting aerial surveillance over Iraq and is dispatching about 300 military advisers to Baghdad and elsewhere to help train Iraqi security forces.

Spying drop-off in Iraq preceded insurgency

Central Intelligence Agency officers in Iraq have been largely hunkered down in their heavily fortified Baghdad compound since U.S. troops left the country in 2011, current and former officials say, allowing a once-rich network of intelligence sources to wither.

That's a big reason, they say, the U.S. was caught flat-footed by the recent offensive by a Sunni-backed al-Qaeda-inspired group that has seized a large swath of Iraq.

"This is a glaring example of the erosion of our street craft and our tradecraft and our capability to operate in a hard place," said John Maguire, who helped run CIA operations in Iraq in 2004. "The U.S. taxpayer is not getting their money's worth."

Maguire was a CIA officer in Beirut in the late 1980s during that country's bloody civil war. He spent weeks living in safe houses far from the U.S. Embassy, dodging militants who wanted to kidnap and kill Americans. In Iraq, where Maguire also served, the CIA's Baghdad station remains one of the world's largest. But the agency has been unwilling to risk sending Americans out regularly to recruit and meet informants.

Iraq is emblematic of how a security-conscious CIA is finding it difficult to spy aggressively in dangerous environments without military protection, Maguire and other current and former U.S. officials say. Intelligence blind spots have left the U.S. behind the curve on fast-moving world events, they say, whether it's disintegration in Iraq, Russia's move into Crimea or the collapse of several governments during the Arab Spring.

Without directly addressing the CIA's posture in Iraq, agency spokesman Dean Boyd noted that 40 officers have died in the line of duty since September 2001. He called "offensive" any suggestion that "CIA officers are sitting behind desks, hiding out in green zones, or otherwise taking it easy back at the embassy."

Boyd said the intelligence community provided plenty of warning to the Obama administration that ISIS could move on Iraqi cities.