Bolivia has elected a centrist senator, Rodrigo Paz, as its next president, bringing an end to nearly 20 years of continuous rule by the Movement for Socialism (Mas) party.
With almost all votes counted, Paz, of the Christian Democratic Party, defeated right-wing candidate Jorge Tuto Quiroga in Sunday's run-off election with a share of 54.6%.
A severe economic crisis and infighting within Mas, which has dominated Bolivian politics since 2006, saw many voters wanting change.
Paz, 58, has said he will end fuel shortages and address Bolivia's wider economic problems. In his victory speech, he said he would open up Bolivia to wider international investment and stimulate private-sector growth.
Paz went from being a surprise frontrunner in the first round of the election in August to achieving a clear win over Tuto Quiroga, who received 45.4% of the votes in the run-off.
The candidate for Mas did not make it into the final round of voting.
Paz is perceived as relatively moderate and centrist compared to his opponent, making him more attractive to undecided and disillusioned left-leaning voters, who wanted change but did not want to cast their vote for Quiroga.
Quiroga has conceded defeat and has called his rival to congratulate him.
Paz's supporters took to the streets of La Paz, the country's administrative capital, to celebrate the result.
One of them told news agency AFP that we came to celebrate the victory with great hope of a new direction for Bolivia.
Bolivia is grappling with severe shortages of fuel leading to long queues at petrol stations, a shortage of US dollars, and soaring inflation. Natural gas exports, which were once a major source of revenue for Bolivia, have also plummeted.
Paz campaigned with the slogan capitalism for all, promising free-market reforms and a commitment to help the poorest in society with social programmes.
He has pledged to ease access to credit for small businesses, lower certain taxes, reduce import tariffs, crack down on corruption, and decentralise the government.
He has also been clear that once in power, he plans to cut fuel subsidies, which he says are unsustainable.
Paz's election victory could signal a thawing of relations between Bolivia and the US, which have not had a formal diplomatic relationship since 2008.
The US has repeatedly accused Bolivia, one of the world's top producers of cocaine, of not meeting its anti-narcotics obligations, and has long criticised its recognition of Venezuela’s President Nicolás Maduro.
Reacting to Paz's election win, the US State Department said it looked forward to partnering with President-elect Rodrigo Paz to restore economic stability, expand private-sector growth, and strengthen security.
Paz’s choice of running mate is thought to have helped him attract working-class voters and Bolivians frustrated with government corruption. A former police captain, Vice-President-elect Edman Lara is known for his humble upbringing and whistleblowing on police corruption.
For many Bolivians, this election result reflects a desire for change and renewal. But Paz inherits tough economic circumstances and a divided country. Restoring economic credibility and uniting a country polarised into many factions after years of political turmoil will not be an easy task.
Paz will take office on 8 November.