Anti-corruption candidate Nayib Bukele has claimed victory in El Salvador's presidential election.
With most votes counted, the former mayor of San Salvador had nearly 53% of the vote with his closest rival, the conservative Carlos Calleja on 32%.
Mr Bukele, 37, needed more than 50% of the vote to avoid a run-off.
The businessman has vowed to tackle corruption and combat the criminal gangs responsible for one of the world's highest murder rates.
Politics in El Salvador has been dominated over the past three decades by two main parties - the incumbent left-wing FMLN and the conservative Arena.
"Today we won in the first round and we made history," Mr Bukele, who represents the Gana (National Alliance) party, told cheering supporters, turning to include them in a selfie.
"We have turned the page on power."
His victory was acknowledged by Mr Calleja and by FMLN candidate Hugo Martinez.
"We recognise the results of these elections. We are going to call the president-elect to wish him luck in facing the challenges in this country," Mr Calleja said.
Mr Martinez was in third place with just over 14%.
Electoral officials said official results would be declared within two days.
Earlier, the electoral court opened an investigation into whether Mr Bukele had broken the law by violating a news embargo.
He was accused of asking for votes during an interview broadcast live on Facebook earlier on Sunday.
Correspondents say Mr Bukele faces challenges in office including a sluggish economy and rampant poverty. He has said he aims to increase investment in education and to set up an anti-corruption commission with the support of the UN.
To get his policies through he will need to form an alliance with right-wing parties, which dominate Congress.