Insurgents of the Islamic State of Iraq and Syria, or ISIS, gained ground in Iraq in the past month at a pace so rapid that a battle for Baghdad seemed inevitable. But even as the group declared the formation of an Islamic caliphate, its advance slowed and its forces diverted their attention to towns in the north -- a sign the group may lack the capacity to take on Prime Minister Nouri al-Maliki’s forces in the capital, experts say.

“They realize Baghdad is going to be a tough fight, which is why they haven’t pushed toward west Baghdad,” said Austin Long, an assistant professor of international and public affairs at Columbia University and a former employee of the RAND Corp. “There are some reports they tried to pull around to the south, which could cut supply lines into the south, but they are going to need more than they’ve got now.”

ISIS is now focusing on capturing major oil refineries in Baiji and Kirkuk, while also seizing towns on the border of Jordan. Meanwhile, Iraqi security forces have time to strategize a counteroffensive.

“Right now, [ISIS fighters] are hitting the limits of what they can take relatively easily,” Long said. “They are sort of attacking everywhere. ... If ISIS chooses not to mass, it limits what it can do.”

The insurgents’ failure to advance is a startling turnaround. In the weeks following the June 10 Mosul takeover, it looked as though ISIS was ready to invade the capital. Journalists and Iraqi activists took to social media to report what was expected to be ISIS’ imminent arrival in Baghdad. Some even reported the militant group entered the Green Zone -- an area of Baghdad where international organizations and leaders reside.

BREAKING NEWS: All flights canceled at #Baghdad International Airport, As terminals are under attack by ISIS. — Jerry Liet (@jerryliet) June 15, 2014

"ISIS likely to strike Green Zone and other fortress targets that have adequate ground protection." #Battle4Baghdad pic.twitter.com/gCa8ifiOuB — ISW (@TheStudyofWar) June 27, 2014 Events developing in Baghdad International Airport and in the Amariya neighborhood mean #ISIS getting closer to Green Zone in Baghdad. #Iraq — Patrick deHahn (@patrickdehahn) June 15, 2014

In response to the ISIS advancement on Baghdad, U.S. President Barack Obama ordered 300 special-operations personnel to Iraq to assist its government in devising a plan to stave off the insurgency. He said they would determine “how we can best train, advise and support Iraqi security forces going forward.”

ISIS was able to advance so quickly partly because its ambitions took the Iraqi and Kurdish militaries by surprise. Now those forces are pushing back, and ISIS is stretched thin. “The other side is not sitting on its hands now,” Barak Mendelsohn, an associate professor of political science at Haverford College, said in a conference call with reporters. “And so it was bound to get to the point where things are starting to slow down.”

Taking Baghdad was never going to be easy for ISIS -- and now the challenge is greater.

According to a report published by the Institute for the Study of War, ISIS would first need to “designate a primary avenue of advance into downtown Baghdad” to take the capital. And the group has yet to find that avenue -- attacking the capital from all sides, but failing to find an entrance.

For example: If ISIS sends reinforcements from the north and concentrates its resources on Baghdad, that could make “it easy for Iraqi military forces to concentrate and take bites out of ISIS,” Columbia’s Long said.

The insurgents have moved their focus to Aleppo, where they will have to fight the Syrian military on one side and the Free Syrian Army on another side. ISIS leaders say they have established an Islamic State. But with their military progress stymied, the aura of invincibility has dissipated and their claims are beginning to sound premature.