In Sinjar, the followers of the ancient Yazidi religious community bore the brunt of the defeat. Hundreds are believed to have been massacred and many more, including young women, are believed to have been kidnapped by IS. The lucky ones who escaped the onslaught blamed the peshmerga for their misery, saying the Kurdish troops did not put up much of a fight.

The fall of Sinjar and Zumar and the strategic areas near Iraqi Kurdistan’s capital, Erbil, drove a painful point home to Kurdish leaders and the population alike: that the structure and capabilities of the peshmerga needed an urgent revision.

Zumar and its nearby oil wells appeared firmly under peshmerga control until early August. But then in a lightning strike, IS forces swept through Zumar on Aug. 2 and Sinjar a day after. It was a defeat as much surprising as damaging for the Kurdish peshmerga forces’ image. When the Iraqi army was routed by militants in June, the peshmerga boasted that they were a different army and could keep the jihadists in check. They clearly underestimated the militants’ power.

“Over the past month we have advanced a lot and have cleaned this area from IS,” said Khidir, standing amid a couple of dozen peshmerga fighters. He says his troops are ready to retake the town whenever the order arrives. The Kurdish peshmerga forces have in fact captured around a dozen villages and strategic oil fields on the road between Sihela and Zumar. Signs of IS militants’ defeat can be seen: A few damaged vehicles, including a Humvee bombed by US aircraft, are scattered by the side of the road.

ZUMAR, Iraq — Standing on a hilltop, Gen. Halgurd Khidir is inspecting through binoculars the situation just a couple of miles farther down in the sea of concrete houses that is Zumar . He appears relaxed, but is keenly aware of the difficult mission his troops are entrusted with: retaking vast territories lost to Islamic State (IS) fighters in early August.

“They [peshmerga and security commanders] fled before the people did,” said Qassim Shesho, a local Yazidi official in Sinjar who stayed behind and put up what many see as a heroic fight against the self-proclaimed jihadists. Sporting a big black-dyed mustache and surrounded by bodyguards in the lobby of a hotel in Dahuk, a city near the Turkish-Iraqi border, Shesho insists that had the local officials had the will, they could have prevented the fall of Sinjar.

“When someone gets into business and cares about money, they cannot fight. They were afraid for their lives,” he said in an attempt to invoke corruption as the major reason to explain the incompetence of the officials in charge of Kurdish forces in Sinjar.

It remains to be seen whether the events in Sinjar will serve as a real wake-up call for Iraqi Kurdistan’s leaders to engage in a fundamental revamping of the peshmerga. They face the classic challenge that many guerilla and revolutionary forces have had in the past: the transformation from a period of principled resistance against a brutal enemy to actually running a country or entity.

Lack of adequate measures of accountability have also created a system that is easy to exploit by some of those in power.

Peshmerga officials say they have taken steps to address the structural deficiencies. The two dominant parties of Iraqi Kurdistan, the Kurdistan Democratic Party (KDP) and the Patriotic Union of Kurdistan (PUK), still retain tens of thousands of peshmerga fighters who receive orders from their respective party leaders and not the Peshmerga Ministry, which is an organ of the Kurdistan Regional Government (KRG). Halgurd Hikmat, a spokesman for the ministry, says the minister, who is from another powerful party, Gorran, has started work on integrating those forces not officially under his command into the ministry’s structure.

The chaos in managing these disparate forces was evident in some fronts such as Sinjar, Makhmour and Jalawla. In Jalawla, lack of proper coordination between the peshmerga units that are part of the Peshmerga Ministry, but are essentially affiliated with the KDP and PUK, led to a temporary defeat and the withdrawal of Kurdish forces from the town in late July, after they had taken it following heavy clashes with IS militants.

Hikmat said the peshmerga minister is now granted extensive powers by KRG President Massoud Barzani to carry out reforms, but admits the process has been “slow.” However, he insists the peshmerga will not experience defeat again the way they did in Sinjar, Zumar, Jalawla, large parts of the Ninevah plains and areas around Erbil.

“In Sinjar, in particular, we have set up committees to find out what happened there. … Three officials are now arrested and some others are being investigated,” Hikmat said. “We are certainly hoping this [Sinjar defeat] will become a lesson and such things would not happen again.”

Apart from the personal failings of some of the senior officials in Sinjar that brought a major tragedy upon the Yazidi community there, Kurdish forces have complained frequently that they are not as well armed as the IS fighters.

When they occupied Mosul and other major areas in the Sunni heartland of western and northern Iraq in June, the jihadists seized advanced and heavy weaponry used by at least four divisions of the Iraqi army.

Since August, a host of Western nations and Iran have delivered arm shipments to Iraqi Kurdistan’s government. Hikmat said Germany and France in particular have delivered some much-needed heavy arms such as anti-tank weapons and large vehicle-mounted automatic machine guns. He said peshmerga officers are now being trained inside Iraqi Kurdistan and abroad on how to use the weapons and that the arms will be distributed at the fronts according to need.

“It’s a great deal of responsibility how these weapons are distributed,” Hikmat said. “They should be handed out to the forces according to a plan and not in a random manner.”

Some Western nations, such as Germany, have made it a condition that the weapons should not fall into the hands of a third party, including the Kurdistan Workers Party (PKK) and its affiliates that are currently fighting IS forces in Iraq and Syria’s Kurdish regions.

During a visit by Al-Monitor to the fronts near the Syrian border, a large convoy of heavy weapons, including artillery guns and tanks, were spotted as they were being transferred to peshmerga forces in those areas. In the convoy were several troop-carrying Mercedes-Benz trucks that Kurdish soldiers said were donated by Germany.

Near Zumar, Khidir complained that his troops use outdated weapons, mostly Russian, “that have been used in several wars.” He and his troops were recently lucky to receive some armored vehicles that were left behind by Iraqi troops when they fled the area in June.

But he has a major advantage that has bogged down IS troops for weeks: US airstrikes.

“The US airstrikes have been very helpful. … They [IS fighters] now cannot move around much, fearing they will be bombed,” said Khidir, who, like many other fighters here, was quick to note the effectiveness of US air power in halting IS advances.

For over a month, Kurdish forces have steadily but slowly regained lost ground. They are trying to be careful not to overreach, and are aiming to reclaim their lost territory one front at a time.