ALGIERS, Algeria (AP) -- The main opposition candidate in Algeria's presidential elections cried foul late Thursday night hours after voting ended, alleging massive fraud and vowing to reject any results announced.
Ali Benflis told supporters at his headquarters that preliminary information indicated fraud on a grand scale with grave irregularities across the country.
"Our history will remember this date as a great crime against the nation by stealing the voice of the citizens and blocking popular will," he said, while fireworks from celebrating supporters of President Abdelaziz Bouteflika, his opponent, could be heard in the background.
The national commission charged with supervising the elections, however, insisted that aside from a few incidents, the election went smoothly with just 130 complaints.
Turnout was 51.7 percent of the 23 million registered voters, according to the Interior Minister.
Benflis' speech essentially amounted to a concession of defeat, though he vowed to use "all peaceful political means as well as legal avenues" to resist the results.
The election appears to have been the most competitive presidential contest in Algeria's recent memory with Benflis putting up a spirited fight against an ailing Bouteflika who had the full might of the powerful state to make up for his weakened condition.
The 77-year-old president is still recovering from a stroke last year that has left him speaking and moving with difficulty and he was entirely absent from the three week presidential campaign -- leading some to question his fitness to lead this oil-rich nation and key U.S. ally in the war on terror.
The signature image of Thursday's vote was Bouteflika being wheeled into a polling station to cast his vote -- however he still has a great deal of support in a country traumatized by a decade of civil war in the 1990s.
Turnout throughout the day in the sundrenched Algerian capital appeared to be fairly light with older people voting in numbers and the young -- who make up a majority of the population -- staying away.
Memories of the brutal struggle against radical Islamists in the 1990s that claimed 200,000 lives are still fresh in many people's memory and for them Bouteflika has been synonymous with a return to peace.
"Young people don't vote, but people my age vote because they remember the dark times and they know what's important," said Nabil Damous, a 41 year-old man voting in the immense Abdel Kader high school, formerly a convent, on the edge of the low-income Bab el-Oued neighborhood. "People who don't vote don't want this country to move forward."
Sonia Izem, a middle-aged woman in a dark headscarf, said she was voting for Bouteflika because she, too, remembered when Bab el-Oued was a battleground between security forces and Islamists and because she felt the rampant corruption in the country would be less during the fourth term.
"The people around him have already stolen a lot and they have nearly filled their sack and they won't need to steal very much in the next term," she said as she entered the nearly empty school around midday. "If we bring in someone new, they will have to start stealing all over again."
Yet while Algeria escaped the pro-democracy uprisings of the Arab Spring, frustrated youth stage thousands of small demonstrations every year over the lack of jobs, opportunities and housing.
In several cities around the country, young people clashed with police after attempting to destroy ballot boxes. The most serious of the clashes was near the city of Bouira, 100 kilometers (60 miles) southeast of Algiers, in which 44 policemen and numerous demonstrators were injured.
Thanks to high oil prices over the last decade, dissatisfaction has been traditionally addressed by spending the country's impressive oil wealth but resources are dwindling and soon the government may have to pursue a different approach to meet the people's needs.
The government said 186,000 police were mobilized to protect the polls and there was a heavy security presence in Algiers on Thursday. A few small demonstrations by those calling for a boycott of the vote were quickly dispersed.