KABUL (AFP) - Afghans voted Thursday to elect a president for only the second time in history as the government and the West acclaimed the ballot despite fears of poor turnout after a day of sporadic Taliban violence. The White House and NATO joined President Hamid Karzai-who is bidding for another five years in office-in saying that the war-weary Afghan people had defied threats of militant violence to exercise their democratic rights. The Afghan people dared rockets, bombs and intimidation and came out to vote, the Western-backed Karzai told a televised news conference as polling wound down, hailing a day of pride and glory for the country. Insurgents stormed the small northern town of Baghlan, sparking clashes that left up to 30 militants dead according to the governor, and officials said scattered unrest killed 26 civilians and security personnel. Overall the security situation has been better than we feared. That is certainly the most positive aspect of these elections, the UN representative in Afghanistan, Kai Eide, told a news conference. Officials said it would be some days before they could determine how many of the 17 million registered voters had cast their ballots, but Interior Minister Hanif Atmar said the government was satisfied with turnout levels. Some independent observers feared turnout was low, however, especially in the south where the Taliban insurgency is at its bloodiest despite a US and NATO campaign to pacify the lawless nation. Turnout (in Kandahar) is definitely very, very low, significantly lower than in the north, one Western diplomat told AFP, referring to the capital of the Talibans 1996-2001 regime. There was a turnout of about 70 percent in the first direct presidential election five years ago. Since then, Western allies have pumped billions more into Afghanistan and deployed thousands more troops to contain the Taliban revolt. US President Barack Obama said Thursday that Afghanistans election appears to have been successful, despite attempts by the Taliban to derail it with violent attacks. We had what appears to be a successful election in Afghanistan despite the Talibans efforts to disrupt it, Obama said in a White House interview with conservative Philadelphia radio host Michael Smerconish. Lots of people have defied threats of violence and terror to express their thoughts about the next government for the people of Afghanistan, President Barack Obamas spokesman Robert Gibbs said. Gibbs said however that the United States would withhold judgement until the release of final results, which Afghanistans election commission says will not come before next month. Afghans were electing a president and 420 councillors in 34 provinces across the country, where grinding poverty, rudimentary infrastructure, corruption, illiteracy and daily bloodshed remain the norm. Voting at some sites was extended beyond the scheduled close of 1130 GMT to accommodate people still lining up. Voters went through security checks before having a finger stamped in indelible ink to prevent repeat voting. Notable election-day clashes included the multi-pronged assault by Taliban militants in Baghlan and a two-hour shootout between insurgents and Afghan forces in Kabul that killed two militants. Afghanistans election authority launched an investigation into complaints of irregularities during landmark polls Thursday as independent observers raised fears low turnout could undermine the ballot. Allegations from candidates included that ink used to mark voters fingers could be scrubbed off and that election officials had told people to vote for the incumbent President Hamid Karzai, the election commission said. The main challenger, ex-foreign minister Abdullah Abdullah, released a statement detailing about 40 incidents of alleged irregularities, most saying that officials had pressured voters into choosing Karzai. Another presidential candidate, Ramazan Bashadost, said he had been able to remove the ink with cleaning fluid, Independent Election Commission (IEC) chief Azizullah Lodin told reporters. Lodin said he himself had tested the ink used to avoid people voting more than once Another complaint was that hole punches used to mark voters cards failed, although this was remedied with the use of scissors, he said. There were also charges that voting centres did not have enough ballot papers, even though papers were allocated according to the number of voters registered. Authorities said there had been 135 security incidents across the nation. Lodin said it would take three to four days to finalise a turnout figure.