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.
The BBC’s Lyse Doucet in the city says Islamist militants were held off by government troops with the help of air strikes by the US-led coalition.
However, the insurgents have not retreated and some are less than 10km (six miles) from the city, she adds.
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.
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.
-BBC