(Updates with leftist nearing margin needed for outright win)
By Alexandra Ulmer and Alexandra Valencia
QUITO, Feb 19 (Reuters) - Leftist government candidate Lenin Moreno was winning Ecuador's presidential election on Sunday, partial results showed, and was close to the margin needed to avoid a runoff against conservative former banker Guillermo Lasso.
In the event of a runoff, Ecuador's fragmented opposition is expected to coalesce around Lasso amid anger over an economic downturn and corruption scandals, although the ruling party has strong support among the country's poor.
If Moreno prevails in the first round, Ecuador would buck the recent trend of South American countries moving away from the left - notably Argentina, Brazil and Peru - after a decade-long commodities boom in the region rich in oil, metals and soy.
In Sunday's nail biter election, Moreno, a disabled former vice president, was a whisker short of the 40 percent of valid votes and a 10 percentage point difference over the nearest rival to avoid a second round vote on April 2.
He had 38.86 percent of valid votes versus 28.50 percent for Lasso, with 80.5 percent of votes counted, according to the official preliminary election count.
The head of the electoral council warned it was too early to call and Moreno told cheering supporters in Quito he still expected to reach the 40 percent threshold as votes from more pro-government areas were counted.
But Lasso, 61, was already celebrating in his humid hometown of Guayaquil by the Pacific Coast under a stream of confetti.
"My hands are extended to embrace every single Ecuadorean who dreams of change," Lasso said, flanked by his wife and surrounded by supporters chanting "Lasso President!"
Lasso has campaigned on a platform to revive the economy - which is dependent on exports of oil, flowers and shrimp - by slashing taxes, fostering foreign investment and creating a million jobs in four years. His pro-business policies have some fixed-income investors betting on a bonanza in Ecuador should he win.
Lasso has also vowed to remove Wikileaks founder Julian Assange from the Ecuadorean embassy in London and denounce Venezuela's Socialist government.
The next president faces strong pressure to create jobs and crack down on graft amid corruption scandals at state-run oil company PetroEcuador and Brazilian conglomerate Odebrecht .
"As president, Lasso would give this country a new face," said Maria Lourdes Rosales, a 54 year-old lawyer in Guayaquil. "First with jobs, secondly by giving us back the dignity we've lost with this corrupt government."
But Lasso has also alienated some voters who deem him a stuffy elitist linked to the 1999 financial crisis when hundreds of thousands lost their savings.
Moreno, 63, who lost the use of his legs two decades ago after being shot during a robbery, has a more conciliatory style than the pugnacious President Rafael Correa and has promised benefits for the disabled, single mothers and the elderly.
"I want Ecuador to keep advancing and Lenin will help poor people have a better life," said Margarita Revelo, a 40-year old odontologist in the mountainous capital, Quito.
Critics say Moreno is woefully ill-equipped to overhaul an economy ailing under low oil prices, steep debts, and high taxes on the middle class.
His running mate, Jorge Glas, who as Strategic Sectors minister oversaw the oil and infrastructure industries, has also been accused by a fugitive oil minister of corruption in the Petroecuador case. Glas has denied wrongdoing.
Correa, one of the key figures in Latin America's leftist axis for years, has brought stability to the politically turbulent country but has aggravated many with his confrontational style.
He plans to move to Belgium with his Belgian wife after leaving office.
The new president takes office May 24 for a four-year term.
Additional reporting by Jose Llangari, Yury Garcia and Yolanda Proaño; Writing by Alexandra Ulmer; Editing by Phil Berlowitz and Mary Milliken