(Repeats Wednesday item with no changes)
* Fearsome reputation, surprised and outgunned
* Islamic State attacked fighters with suicidal zeal
* Defeat damaged peshmerga reputation
* Peshmerga fighters given chance to fight back
By Isabel Coles
DOHUK, Iraq, Aug 13 (Reuters) - The Kurdish peshmerga fighter ran out of ammunition but saved two bullets to end his own life in case Islamic State militants caught up with him as he fled the front line in northwest Iraq.
After a two-month stand-off along a 1,000-kilometre (630 mile) long front, the Kurds failed their first major test, allowing the Sunni militants who want to redraw the map of the Middle East to grab more towns, oil fields and Iraq's biggest dam.
The peshmerga, literally "those who confront death", had built up a reputation as fearsome warriors, but in the end they proved no match for the better-armed militants who attacked them with suicidal zeal.
"They took us by surprise," said the peshmerga fighter, who asked to remain unnamed because the force had been ordered not to divulge any information about their defeat.
"For every mortar round we fired, they fired 100 back. We didn't know where they were coming from. We lost contact with each other. We didn't have enough weapons. It was chaos," he told Reuters.
In just a few days, the Kurds pulled back to the borders of their region, leaving behind towns they had held for years and tens of thousands of people at the mercy of militants notorious for beheadings and execution-style shootings.
The Islamic State militants reached to within 35 km of the Kurdish capital Arbil, prompting the United States to launch air strikes on Iraq for the first time since the end of U.S. occupation in 2011.
The routing damaged the peshmergas' aura of invincibility as one of the only fighting forces in Iraq capable of taking on the Islamic State, and threatened the Kurdistan region's standing as the sole patch of stability in a country torn by sectarian conflict.
"This was the first time we saw the peshmerga withdraw, and it had a deep impact on all the peshmerga and the whole of Kurdish society," said spokesman General Halgurd Hikmat.
PESHMERGA UNTESTED AFTER INVASION
The Peshmerga emerged from the Kurdish nationalist movement in the first half of the 20th century after the collapse of the Ottoman and Qajar empires, and number about 200,000.
During Saddam Hussein's decades of iron-fisted rule, they won their reputation as the supreme guardians of the ethnic Kurds, non-Arabs who have always dreamed of an independent state in Iraq's mountainous north and beyond.
During Saddam's dictatorship, they were regularly subjected to military campaigns, including chemical weapon attacks and assassinations. The peshmerga were never really tested after a U.S.-led invasion toppled Saddam in 2003.
While Shi'ites and Sunnis engaged in wholesale sectarian slaughter, Kurdistan remained free of the bloodshed. Just possessing mostly AK-47 assault rifles wasn't a big problem.
That changed after the Islamic State seized arms from tanks to anti-aircraft weapons and machineguns from thousands of U.S.-trained soldiers who fled their first advance in June.
A video filmed by the Islamic State after it overran towns in the Nineveh plains showed peshmerga uniforms left hanging from pegs on a wall, and the television still playing triumphal footage of a peshmerga parade.
"One of the major faults in Kurdish history has been a tendency to be overconfident at the worst of times," said Ramzy Mardini, non-resident fellow with the Atlantic Council.
"The Kurds have certainly oversold their military capabilities and security establishment. There was likely a strategic logic to puff out the chest and inflate the rhetoric, but at some level, many Kurds may have believed their own propaganda."
As the Islamic State marched on Baghdad and the Iraqi army abandoned its bases in the north of the country, the Kurds capitalised on the chaos to expand their territory by as much as 40 percent overnight, hardly firing a bullet.
Having seized oilfields in the town of Kirkuk, the peshmerga took up defensive positions, occasionally skirmishing with the militants but avoiding full-on confrontation. At least 150 peshmerga have been killed since the Islamic State seized the city of Mosul on June 10, according to Kurdish officials.
Stretched thin over a vast area and armed with Soviet-era weapons raided from the Iraqi army during the 2003 invasion, the peshmerga were unprepared to confront an enemy that has been honing its skills in neighbouring Syria for the past two years.
"The peshmerga are used to guarding checkpoints but they're not used to this kind of high-intensity fighting in places they often don't know amongst people who are not Kurds," said John Drake, Iraq analyst at London-based consultancy AKE, a firm that advises the oil industry amongst other clients.
The Islamic State was also better equipped with weapons plundered from the Iraq army, including long-range artillery, tanks, armoured vehicles, rocket launchers, and sniper rifles, as well as tons of ammunition. They were also flush with cash.
The U.S. government has now begun supplying arms to the Kurds directly, responding to their pleas for military hardware to match the Islamic State's. The threat has also spurred cooperation between the region and the federal government in Baghdad, which has withheld arms and salaries from the peshmerga for years due to disputes over oil and budgets.
Charles Dunne, who worked on Iraq at the White House during the Bush administration, said the Kurds were strong enough to preserve themselves, but might not be able to regain all the territory they let go.
"Militarily, I doubt that the KRG's (Kurdish Regional Government) armed forces are capable of, or, especially, willing to take the fight far south of their borders but, with substantial assistance - not only weapons but intel - are capable of defending their own territory."
OLD GUARD GONE
Those who earned the peshmerga's reputation for prowess and bravery fighting Saddam's army are now older or dead, and the new generation has little if any experience of war.
Many peshmerga work a second job to supplement an average salary of just 650,000 Iraqi Dinars ($560) per month.
"It's been almost a decade since their mostly light infantry brigades have been tested in battle, so it's not surprising that they've taken some knocks from IS," said a U.S. official, who described the peshmerga as "capable and disciplined".
"The peshmerga certainly have the resilience and skill to fight back effectively, as we are already starting to see on the ground."
In recent days, the Kurds appear to have regained their footing. Thousands of volunteers have rushed to join the peshmerga's ranks, and two towns - Makhmur and Gwer - were retaken with the help of guerrillas from the Kurdistan Workers' Party (PKK) after U.S. strikes on Islamic State positions, witnesses said.
Further east, however, they were forced to surrender the town of Jalawla, in a strategic loss one peshmerga deployed there blamed at least in part on internal Kurdish rivalries.
Although Kurds are united in hostility to the Islamic State, the peshmerga still answer ultimately to the region's two dominant political parties, which fought a civil war against each other during the 1990s.
Plans to overhaul the peshmerga and integrate them under a unified command are incomplete, and a senior Kurdish politician told Reuters the weakest units were the mixed ones, because each party had kept its best fighters for itself.
"Yes, there have been some reverses by the peshmerga and disorganisation, some withdrawals in certain places, but this is not a conventional war," said Iraq's Foreign Minister Hoshiyar Zebari, admitting that even the most expert peshmerga commanders had been stunned by the ferocity of the Islamic State.
"Nobody should underestimate their ability and capacity. They are attacking with small numbers, mobile forces and speed: they are not holding territory."
The peshmerga's withdrawal from Sinjar left tens of thousands of ethnic Yezidis at the mercy of the Islamic State, which considers them devil worshippers, or stranded on a mountain with scant food and water.
Several Yezidis said they had begged the peshmerga to hand over their weapons before they withdrew so they could protect themselves, but were refused.
"There was categorically no order to withdraw from any front," said peshmerga spokesman Hikmat, dismissing statements by some Kurdish officials that the retreat was tactical. "There was negligence."
Hikmat said the field commanders responsible for the area were under investigation. It will take more, however, to restore confidence among Yezidis, who feel betrayed by the peshmerga.
"We used to feel safe, and that the peshmerga had our back," said 31-year-old Yezidi Firas, who fled Sinjar with his family and eventually made it to the Kurdish city of Duhok after escaping from the Mount Sinjar via Syria.
"We trusted them, but they withdrew and destroyed us. How can we trust them anymore?"
Walking on crutches, the peshmerga, who was wounded fighting in Sinjar, said he would return to the line of duty as soon as his ankle healed, but admitted he had never really expected to take part in a conflict.
"We didn't think the day would come when there would be another war". ($1 = 1162.9000 Iraqi Dinars) (Additional reporting by Michael Georgy in Baghdad, Warren Strobel and Missy Ryan in Washington and Peter Apps in London; editing by Michael Georgy, Peter Millership and Will Waterman)