Paraguay's Mario Abdo Benitez, who represents the country's long-dominant Colorado conservatives, was elected as president on Sunday, landing the top job in one of Latin America's poorest countries.
The US-educated son of a senior aide to the country's late dictator, Abdo Benitez won slightly more than 46% of the vote, with his centrist opponent Efrain Alegre taking almost 43% in a race that was far closer than expected.
Opinion polls had consistently given Abdo Benitez, 46, a clear lead of up to 20 points over Alegre in a two-man contest to succeed outgoing conservative President Horacio Cartes.
Despite a slow start, turnout stood at 65% by the time polling stations closed at 16:00 (20:00 GMT). As the counting got under way, it quickly became clear the race would be much closer than expected.
Analysts said electing Abdo Benitez, the son of the personal secretary to dictator Alfredo Stroessner, suggested that Paraguayans had managed to turn the page on the darkest chapter of their recent history.
Landlocked Paraguay – sandwiched between Argentina, Bolivia and Brazil – has enjoyed consistent economic growth under tobacco magnate Cartes, but has failed to shake off persistent poverty, corruption and drug trafficking.
It remains a land of contrasts, still marked by the 1954-1989 dictatorship of General Stroessner.
However, a new generation of voters among the electorate of 4.2 million – born after the dictatorship responsible for the deaths or disappearances of up to 3 000 people – seems ready to look to the future.
"Most people feel resentful towards Cartes," 18-year-old student Alex Gimenez told AFP.
In Paraguay, 43% of the population is aged between 18 and 34.
A vote for change?
Ahead of the vote, Abdo Benitez appeared confident his background would not affect his chances.
"I have earned my democratic credentials on my political journey," he said.
But Alegre had banked on people voting for change after almost 70 years of dominance by the ruling Colorado party.
"Paraguayan society is changing faster than its political elite," Oliver Stuenkel, professor of international relations at Sao Paulo's Getulio Vargas Foundation, wrote in Americas Quarterly.
"A generation is gaining influence that has no clear memory of non-democratic rule – a first in Paraguayan history."
Voters also cast their ballots for a new parliament and governors of the country's 17 departments.
Growth, but grinding poverty
Tobacco magnate Cartes kept Paraguay on course for year-on-year growth of about 4.0% in an economy whose major exports are soybeans, beef and hydroelectric power.
But there has been little progress in alleviating poverty that has remained stubbornly at 26.4% and corruption, with Paraguay languishing 135th out of 180 countries ranked by Transparency International.
The outgoing president himself admitted that Paraguay had "social debts" and that "everything needs to be done".
"It is just not conceivable that with all the richness we have in a country of seven million people, that we have such poverty," he said after casting his ballot.
Odds in Colorado's favour
Abdo Benitez, who goes by the nickname "Marito", has pledged to reform the judicial system to render it less prone to corruption, but to maintain Cartes' economic policy.
Alegre, the outsider at the head of the centrist GANAR alliance, had offered free health care for the poor and to slash the cost of electricity to stimulate investment and jobs.
But the odds are stacked in Abdo Benitez's favour: The only time the country had a president who did not come from the Colorado party was in 2008-2012, when former Catholic bishop Fernando Lugo ruled.
- FOLLOW News24 on Twitter