By Sofia Menchu and Diego Oré

Juan Jose Arevalo was a reformer whose legacy of social progress during his 1945-1951 term looms large for the next leader of Central America's most populous nation.

"I'm not my father, but I'm traveling down the same road he built," Arevalo said last week during his campaign's closing rally.

Few expected the younger Arevalo, a previously little-known first-term congressman and ex-diplomat, to make it this far. Several other anti-establishment candidates were disqualified earlier in the campaign in moves widely criticized by rights groups as attempts by authorities to preserve an unpopular status quo.

But running on an anti-corruption platform, the 64-year-old center-left candidate defeated runner-up Sandra Torres, a former first lady and three-time presidential hopeful, by a 21-point margin in a preliminary tally.

Arevalo was born in Uruguay after his parents fled Guatemala following a 1954 U.S.-backed military coup that ousted the elder Arevalo's successor.

The family lived in Venezuela, Mexico and Chile before returning to Guatemala when Arevalo was a teenager. He would later study sociology at university in Israel.

Prior to entering politics, he was known for writing books and articles dealing with topics including conflict and public policy. He had several stints as a diplomat, including as Guatemala's ambassador to Spain.

"He always had an academic air about him, but cheerful and open to sharing experiences and ideas with young people," said Alvaro Montenegro, an anti-corruption activist who met Arevalo in 2015.

That was the year when thousands of protesters took to the streets to demand the resignation of then-President Otto Perez Molina, who had been accused of orchestrating a wide-ranging customs bribery scandal. The conservative former army general was later convicted and jailed, giving many Guatemalans hope that rampant corruption could be tackled.

The charges were spearheaded by a hard-charging anti-graft attorney general working with a pioneering U.N.-backed commission that would later lead to dozens more prosecutions before its mandate was allowed to expire in 2019. Conservative critics, many hailing from the elite, assailed the commission for undermining the country's sovereignty.

Arevalo took part in the pivotal 2015 protests, and a couple of years later helped create what would become the upstart Seed movement - Semilla in Spanish.

The party's 2017 registration later came under official scrutiny, but only after June's first-round presidential vote, in which Arevalo finished second and qualified for the August run-off. Before that, he barely registered in opinion surveys. Prosecutors sought to disqualify him and his party from the ballot, saying there had been irregularities in member registration.

The effort was temporarily thwarted by Guatemala's constitutional court, but it is not over. The same prosecutors have said they cannot rule out additional raids and arrests in the case.

The thrice-married Arevalo and father of six must now navigate an unpredictable five-month transition ahead of January's scheduled inauguration.

He will also need to work with a Congress still dominated by conservatives, in which Semilla only has 23 lawmakers in the 160-member body.

But the unlikely president-elect projected optimism Sunday night, just as he had on the campaign trail.

"The new spring is coming, you can feel it," he told cheering supporters during an August campaign rally. "And all of you are the seeds of this new spring."

(Reporting by Sofia Menchu and Diego Ore; writing by David Alire; Editing by Rosalba O'Brien)