Conservative former senator Mario Abdo Benítez has been elected president of Paraguay.
He beat his closest rival, Efraín Alegre from the liberal opposition alliance, by four percentage points.
The result means the right-wing Colorado Party, which has dominated Paraguayan politics for decades, will maintain its hold on power.
Mr Abdo Benítez, 46, has promised to retain low tax policies and boost agricultural exports..
With almost all of the ballots counted, he had won 46.46% of the vote compared to 42.73% for Mr Alegre.
"My administration will be committed to gaining the confidence of those who did not accompany us," he said in his acceptance speech on Sunday night.
"[We] welcome those who want to build a just homeland, a homeland with equity, a homeland with moral, strong, independent institutions."
Mr Alegre has not yet conceded victory, but he told reporters that he "respects" the preliminary results.
Mr Abdo Benítez is the son of a close aide to former military dictator General Alfredo Stroessner, and has faced criticism for defending the former leader's record.
Gen Stroessner ruled the country from 1954 to 1989 and is viewed by critics as one of Latin America's most secretive and sinister dictators.
Paraguayans also voted to elect senators, parliament deputies, governors and other local officeholders on Sunday.
Outgoing President Horacio Cartes, who triggered riots last year when he tried to change the constitution to allow him to seek a second term, won a seat in the Senate.
The current constitution, established in 1992 after the dictatorship, limits the head of state to a single five-year term.
Paraguay, a leading exporter of soybeans and beef, has enjoyed strong economic growth in recent years.
Political debate in the low-key electoral campaign focused mainly on security, corruption and social issues, over which analysts noted the two presidential rivals held relatively similar positions.
Both candidates pledged to reform the country's judicial system to more effectively tackle corruption.