Nicaraguan President Daniel Ortega, a former Marxist guerrilla leader, was headed for a landslide victory in Sunday's presidential election.

Preliminary results showed Ortega, who has cemented his hold on power with social spending for the poor, had 63.7 percent support based on a count of votes from 18 percent of polling stations.

His closest competitor, radio personality and businessman Fabio Gadea, was way off the pace, back on 29 percent.

A win would give Ortega his first back-to-back terms in office since he helped the Sandinista rebel army to overthrow the Somoza family's dictatorship in a 1979 revolution.

Yet his lead was bigger than the win projected by opinion polls and Gadea supporters accused Ortega's Sandinista party of manipulating the electoral process, stuffing ballot boxes and making it hard for conservatives to cast their vote.

There were also outbreaks of violence during voting, with nine people injured in a clash in northern Nicaragua.

The mood was festive on the streets of Managua, where hundreds went out to celebrate an Ortega victory.

I'm happy because Daniel is helping the poor, he's helping the people in Nicaragua, said student Alexander Reyes, 23. I hope he carries on delivering on works and not just words.

Longtime U.S. adversary Ortega has overseen a period of economic progress in his five years in power, backed by funds from his socialist ally in Venezuela, President Hugo Chavez.

Having survived a U.S.-backed Contra rebellion as president in the later half of the 1980s, Ortega was voted out in 1990.

Since his return, Ortega has solidified his hold on Central America's poorest country with programs to improve health and education, microcredits and gifts of livestock.

Backed by Venezuela, Ortega has reduced poverty in this largely agrarian nation and is credited with allowing the private sector to operate freely.

Ortega's task has been made easier because his two main conservative opponents failed to join forces against him.

But he was only able to run for re-election thanks to a 2009 ruling by the Supreme Court -- which his Sandinista party controls -- that did away with a ban on consecutive terms.

The court's decision has led to accusations that Ortega, aims to stay in power indefinitely like Chavez.

How can Ortega call himself a revolutionary when he's a dictator? Roberto Betancourt, who has a farm on the outskirts of Managua, said at a polling station. He has no principles, he's following in the footsteps of Somoza.

MODERATION

Since returning to office in 2007, Ortega has presented himself as a devout Christian, and swapped his military fatigues for white shirts and the red and black Sandinista flag for pink banners on the campaign trail.

His relations with Washington remain tense and the U.S. government said it was concerned about irregularities ahead of the election, including difficulties some voters had to register and some domestic observers to get accreditation.

Ortega has moderated his socialist rhetoric in recent years, although he is part of the Chavez-led bloc of left-wing governments in Latin America. Critics say he is too dependent on Venezuelan aid, but the funding has brought results.

Poverty has fallen to 57 percent of the population from 65.5 percent in 2005, according to government and World Bank statistics. Despite that, Nicaragua is still second only to Haiti as the poorest country in the Western Hemisphere.

(Additional reporting by Alex Leff and Sean Mattson; Editing by Kieran Murray and Vicki Allen)