Ecuadoran presidential candidate Lenin Moreno waves to his supporters as they wait for the final results of the runoff election on Sunday in Quito. (Rodrigo Buendia/AFP/Getty Images)

As a candidate, Lenín Moreno ran as a sunny, conciliatory figure, a leader who would preserve President Rafael Correa’s left-wing policies without his pugilistic, domineering style.

Moreno’s nice-guy skills will now be put to the test.

Moreno squeaked to a win in the presidential election Sunday, an outcome that triggered street protests amid cries of fraud from his opponent, Guillermo Lasso. Although election authorities have not officially declared Moreno the winner, his 51 percent to 49 percent advantage — with more than 99 percent of the ballots counted — looked insuperable.

Moreno will need to mend ties not just with the opposition but with the United States, Ecuador’s top trading partner, with whom relations were often strained during the decade that Correa was in power. Correa kicked out the U.S. ambassador in 2011, gave political asylum in his country’s ­London embassy to WikiLeaks founder Julian Assange in 2012, and reliably sided with the leftist bloc of Latin American nations that view the United States as an imperialistic bully.

Moreno, 64, will need to accomplish all this healing at a time of heightening political tensions in South America and a showdown over the erosion of democracy in leftist ally Venezuela.

[Ecuador on edge as leftist party appears to extend its reign]

Analysts say Moreno may not have the luxury of taking a more moderate path if Lasso’s rejection of the election results leads to a prolonged standoff that requires the new president to shore up support from Correa’s more radical base and regional allies like Venezuelan President Nicolás Maduro.

But Moreno, who lost the use of his legs when he was shot by carjackers in 1998, is the stylistic opposite of alpha-dog Correa, who relished political combat. On the campaign trailed, Moreno seemed to use his wheelchair to close the distance that usually exists between politicians and ordinary people. He met them below eye level, instead of towering over them, and invited children onto his lap. At rallies he cracked jokes and crooned ballads.

In his victory speeches, he promised to extend a hand to his rivals and seek compromise.

“Moreno is less rigid and ideological than Correa, but whether or not he can be conciliatory will also depend on the stance of the opposition,” said Sebastian Hurtado, a Quito-based political analyst. “If the opposition turns more radical, the government could also dig in and turn more radical as well.”

Lasso, 61, a conservative former banker, immediately declared victory after polls closed Sunday, citing three exit surveys showing him winning. Deep stores of resentment at the Correa government seemed to spill out at the mere sight of those unofficial results, as many ­middle-class Quito residents zoomed through the streets in cars, honking and waving flags.

Those emotions quickly turned to anger when the official count showed Moreno with a slight lead. Lasso called on his supporters to reject the results and resist what he said was a naked attempt to steal the election.

His campaign began posting photographs to Lasso’s Twitter account Monday that it said bore evidence of manipulated vote-tally sheets.

“We will exhaust all our political and legal channels, here in Ecuador and abroad, to make them respect the will of the people who called for CHANGE,” Lasso declared Monday.

But the head of the Organization of American States and the region’s right-wing presidents congratulated Moreno on his victory, leaving Lasso with little international support. And with the Correa government in full control of state institutions and backed by a majority in Ecuador’s congress, it was unlikely Lasso’s challenge could change the results, Hurtado said.

“The opposition will question the results and insist there was fraud, but I don’t think it will destabilize the country,” he said. “The government will work to quickly impose its will.”

Ecuador is deeply divided politically, and its presidential contest became a proxy fight between struggling left-wing governments in the region, led by Venezuela, and more-conservative forces that have won recent elections in Argentina, Peru and elsewhere.

[A leftist tries to hold the line in Ecuador as Latin America moves right]

Venezuela’s Maduro effusively praised Moreno in a flurry of tweets, congratulating him for a “heroic” victory.

Analysts say Lasso’s defeat saves Maduro from seeing another close ally turn against his government at a time when countries in the region have condemned Venezuela’s slide toward authoritarian rule.

“That effort likely would have intensified had Lasso won, given comments he made on the campaign trail,” said Eric Farnsworth, a former U.S. diplomat who is the vice president of the Council of the Americas, a business group.

“Despite a desire to improve relations with the United States, particularly as a means to draw investment, there is little likelihood that a Moreno government would break publicly with Caracas,” Farnsworth added, “particularly given the active and vocal support that Moreno has received from outgoing president Correa.”

Read more:

Julian Assange was Ecuador’s guest of honor. Until he wore out his welcome.

Five things you need to know about Ecuador’s election

In Ecuador, an oil boom creates tension

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news