FOR nearly five years, Hamid al-Jumaili commanded an insurgent group hellbent on blowing up American soldiers, vehicles and aircraft in the city of Falluja, a bastion of Sunni militants and scene of some of the most intense fighting of the Iraq war.
Yesterday al-Jumaili, 37, headed a list of candidates under the party banner of the National Front for the Liberation of Iraq, in elections which brought together millions of voters from either side of the Sunni-Shi'ite divide that tore the country apart after the USled invasion in 2003.
It was the biggest display of cross-community support for democracy the country has known, and the toughest test of the past five years for its security forces. The outcome, a relatively peaceful election, albeit marred by isolated acts of violence, was hailed by western observers as a sign that American and British forces can reduce their presence without risking an increase in sectarian fighting.
No one embodied the shift from bullet to ballot box more emphatically than al-Jumaili.
As he prepared to cast his vote, he emphasised that while he had not abandoned those still battling to rid Iraq of American troops, he would now follow a peaceful course.
"I believe that resistance is a legal right and it is not over, but personally I will continue on the political path," he said.
Al-Jumaili is typical of thousands of Sunnis who mobilised against the US occupation along with foreign fighters from Al-Qaeda in Iraq, only to turn against the group when it started slaughtering Shi'ite Muslims as well as targeting American troops.
He founded a resistance cell which countered American attempts to seize control of Falluja in 2004, and by his own admission he participated in planting improvised explosive devices by roadsides and firing rockets at US bases and antiaircraft guns at helicopters.
He was detained in 2005 and released in 2006, then rearrested and charged with running a terrorist organisation before being freed in 2007, apparently for lack of evidence. By then he was dismayed by the number of innocent Iraqis who were dying.
"Too many groups, radical militants and outsiders, were all working in Iraq," he said. "We needed to spare the Iraqis from further bloodshed. I approached the Americans and told them my group, which stretched far, was willing to lay down arms and enter the political arena."
His talks with US representatives were concluded in early 2008, opening the way for him to become one of more than 14,400 candidates in the local elections that took place in 14 of Iraq's 18 provinces.
Sunnis boycotted the last election, in 2005, but turned out in large numbers yesterday, partly because of better security and partly because many, like al-Jumaili, see Iranian Shi'ite influence in the country as a greater threat than the American occupation.
"We have to change the status quo," al-Jumaili said. "Sectarian leaders have been running the show for too long and many foreign hands are involved."
Having seen clear advances in security in the past year, many voters were clamouring for a better quality of life. Although more electricity is generated now than before the war, demand is so high that Baghdad is plagued by power cuts. While more people have telephones, fewer children attend secondary school. GDP is sharply up but unemployment is 50%.
Some regarded the election as a referendum on the rule of Nouri al-Maliki, the Shi'ite prime minister, who faces a general election in less than a year.
Anmar al-Naqib, the 36-year-old owner of a clothes shop in the predominantly Shi'ite district of Khadimiya, in northern Baghdad, was voting for Maliki's Dawa party.
"We've seen a massive improvement in security, and I'm now going to extend my trust and vote for him in the hope that he can deliver on the other issues, such as services and reconstruction," he said.
However, Abdalah al-Anbari, 44, who has a jewellery shop nearby, said: "We're looking for change. Sectarianism and leaders in turbans are over. The country and its people are tired."
The men were among 15m people who had registered to vote in a population of 28m, and faced a dizzying choice of 407 parties vying for just 440 seats across the country.
The 6,000 polling stations opened amid tight security at 7am, many of them in schools where female teachers were standing by to search women voters for suicide bombs.
Voters had to penetrate cordons of razor wire on their way in, and left with their right index finger stained by purple indelible ink to prevent anyone from casting more than one ballot.
Up to eight candidates were murdered during the campaign. However, the voters were left largely alone. Although several mortar rounds landed near polling stations in Tikrit, the home town of Saddam Hussein, nobody was hurt. Two civilians were shot and wounded during a quarrel with soldiers in the Shi'ite Baghdad slum of Sadr City.
The last time voters went to the polls, they had little idea which candidates they were supporting. They voted for a party which appointed its choice of members to a seat.
This time, the candidates' fears of violent recrimination from the opposing side had been lowered, and they were happy to raise their profile with posters, public meetings and even door-to-door canvassing.
It was a far cry from the not-so-distant days when militant groups linked to Al-Qaeda would have seized any opportunity to disrupt the democratic process and destroy the participants.
Thamir al-Thamimi, 42, is said to be a former leader of one such group, the Islamic Army in Iraq, which killed an Italian hostage and three Macedonians. Last week, he sat in a lavishly secured hotel in the green zone of Baghdad, from which Iraq is governed, and admitted to strong associations with three other organisations linked to Al-Qaeda.
Al-Thamimi was campaigning for a party called the Iraqi National Gathering Project with the aim of securing six of Baghdad's 57 council seats. Having fought the US occupation with a vengeance, he now hopes the Americans will stay to curb Iran's influence.
In Iraq, however, as in any other democracy, there are those who are disillusioned with all politicians, and one of the victims of violence used the election to register a personal protest. Hisham al-Obeidi, 40, has struggled in vain to obtain treatment for his three-year-old daughter Shams, who was blinded by a car bomb two years ago. Yesterday, he placed crosses against every name on the ballot to show that he rejected them.
"Every time I see my daughter standing there alone, a small blind angel with a disfigured face waiting for someone to talk to her or take her hand and lead her to the door of the house, I become more convinced that these people care little for anyone but themselves," he said.
Additional reporting: Adam Lewitt