President Barack Obama has acknowledged that US agencies underestimated the threat posed by the Islamist insurgency in Syria.
In a frank TV interview, he said that al-Qaeda had been beaten in Iraq by US forces working with Sunni tribes.
But they took advantage of the power vacuum in neighbouring Syria to emerge as Isis, later called Islamic State.
Meanwhile, there has been fierce fighting to the west of the Iraqi capital, Baghdad.
Air strikes helped Iraqi fighters repel an attack at Ameriyat al-Fallujah, a strategic town 40km (25 miles) outside Baghdad.
In a separate development, the BBC's Lyse Doucet was told that in some areas around Baghdad, insurgents were less than 10km (six miles) from the city.
In an interview with the CBS TV programme 60 Minutes, Mr Obama said Syria had become a "ground zero" for militants who had been able to take advantage of the chaos there.
He reiterated that only part of the solution to defeating them would be military and that a political solution was also necessary.
"During the chaos of the Syrian civil war, where essentially you have huge swathes of the country completely ungoverned, they were able to reconstitute themselves and take advantage of that chaos and attract foreign fighters... who believed in their jihadist nonsense," he said.
President Obama said the jihadists had gained a military capacity by absorbing remnants of Saddam Hussein's old army in Iraq.
Mr Obama noted that his director of national intelligence, James Clapper, had acknowledged that the US had "underestimated what had been taking place in Syria".
Asked whether the US had also overestimated the ability or will of Iraq's US-trained military to fight the jihadists, Mr Obama said: "That's true. That's absolutely true."
He said a political solution was key, one that would arise out of an accommodation between Sunni and Shia populations.
A US-led coalition of Arab and Western states has begun an air campaign to help counter Islamic State (IS), striking targets in Iraq and Syria.
Iraq has remained unstable since the departure of US troops, with the Sunni population largely alienated by the former Shia-led government. Syria has been engulfed in a civil war since 2011.
Over the weekend, US-led coalition aircraft targeted four makeshift oil refineries under IS control in Syria, as well as a command centre.
US Central Command said that early indications were that the attacks by US, Saudi and UAE planes were successful.
Blasts at the Tel Abyad refinery sent flames soaring 60m (200ft) into the sky, Turkish businessman Mehmet Ozer, who lives in the nearby Turkish town of Akcakale, told AP news agency.
They continued for two hours, rocking the building from which he was watching, Mr Ozer said.
Both the refinery and the local IS headquarters were bombed, Turkey's Dogan news agency said.
Meanwhile further fighting was reported in the besieged town of Kobane near Syria's border with Turkey.
Syrian Kurd fighters in Kobane have been holding out against militants but the fighting has sent about 140,000 civilians fleeing towards Turkey.
- Formed out of al-Qaeda in Iraq (AQI) in 2013, IS first captured Raqqa in eastern Syria
- It captured broad swathes of Iraq in June, including Mosul, and declared a "caliphate" in areas it controls in Syria and Iraq
- Pursuing an extreme form of Sunni Islam, IS has persecuted non-Muslims such as Yazidis and Christians, as well as Shia Muslims, whom it regards as heretics
- Known for its brutal tactics, including beheadings of soldiers, Western journalists and aid workers
- The CIA says the group could have as many as 31,000 fighters in Iraq and Syria