Conservative candidate and ex-prison chief Alejandro Giammattei has been elected president of Guatemala.
Preliminary results show he took 59% of the vote, while his centre-left opponent Sandra Torres won 41%.
Ex-first lady Ms Torres, who won the first round in June, was running for the third time, while Mr Giammattei was making his fourth attempt.
Shortly before being elected, Mr Giammattei said he wanted to change a controversial US migration deal.
He has been elected for a single four-year term, replacing outgoing President Jimmy Morales.
Voter turnout was reportedly low amid disillusionment with Mr Morales’ administration and scepticism over corruption.
“It will be an immense honour to be president of this country that I love so much,” said Mr Giammattei.
“We will rebuild Guatemala. I have no words to say how grateful I am.”
US migration agreement ‘not right’
Mr Giammattei told Reuters he wanted to see what could be done to improve a deal agreed by Mr Morales and US President Donald Trump, which seeks to stem migration to the United States by using Guatemala as a buffer zone.
Under the agreement, migrants passing through Guatemala en route to the US would have to apply for asylum in the former rather than in the US.
“It’s not right for the country,” Mr Giammattei said. “If we don’t have the capacity to look after our own people, imagine what it will be like for foreigners.”
In the lead up to the election, both candidates said they opposed the deal, arguing that Guatemala – a country plagued by poverty and violence – does not have the capacity to process the asylum requests and even less so to look after the applicants or return them to their home countries if their requests are rejected.
President Morales signed the “Safe Third Country” agreement on 27 July, just days after President Trump had threatened Guatemala with tariffs and other sanctions.
But Mr Giammattei will not take office until January 2020, by which time the arrangement will be in full swing.
“I hope that during this transition the doors will open to get more information so we can see what, from a diplomatic point of view, we can do to remove from this deal the things that are not right for us,” he said.