Former Algerian Prime Minister Abdelmadjid Tebboune has been elected president in a vote marred by protests.
The 74-year-old succeeds Abdelaziz Bouteflika, who was forced to resign in April after two decades in power.
Mr Tebboune took 58% of the votes in Thursday’s election, according to the head of the electoral commission.
Mr Tebboune and the four other candidates were criticised for being closely linked with the rule of Mr Bouteflika.
President Bouteflika stepped down following demonstrations across the country.
Anti-government rallies have continued, however, with protesters demanding the sweeping away of the entire political establishment.
Thousands of people took to the streets of the capital, Algiers, on Thursday to protest against the election.
Mr Tebboune rose from a long career as a civil servant to become prime minister in 2017 but lasted just seven months after falling out with influential businessmen. He also served as housing minister and information minister.
In his election campaign he promised to pursue taxpayer money “stolen and hidden abroad”.
Mr Tebboune has been dubbed “the chosen one” by social media users who see him as close to army chief Gen Ahmed Gaid Salah, the county’s de facto leader.
Electoral officials say about nine million people voted on Thursday – a turnout of about 40%.
“The turnout is satisfying and it will give the new president enough backing to implement his reforms,” said Ahmed Mizab, a commentator on state television.
Why are people protesting?
For nearly a year, thousands of Algerians have protested every Friday in the capital and other cities against any elections under the current government.
They want all officials associated with the regime of ousted President Bouteflika. including interim President Abdelkader Bensalah and Prime Minister Nouredine Bedoui, to be removed from office.
“No election with the gangs”, “they must all be removed” protesters have chanted week after week, referring to the politicians and businessmen in the inner circle of the ousted president whom they see as corrupt.
They say new faces must be brought in to organise “real elections” in a country where the winner of presidential elections has always been easy to guess.
On Thursday, protesters briefly overran a polling station in Algiers. An attempt by police to disperse the crowd failed.
Two more voting centres were stormed in the Kabylie region, east of the capital.
More about Algeria:
What has changed since Bouteflika left?
It was army chief Gen Salah who triggered the removal of President Bouteflika, his former ally, when he called for his office to be vacated. The move was designed to appease nationwide protests against Mr Bouteflika seeking a fifth term.
Since Mr Bouteflika’s ousting in April, there have been sweeping arrests of wealthy businessmen and high-profile officials close to the former president and his inner circle.
They include his brother Saïd Bouteflika who was jailed for 15 years for conspiring against the state and undermining the military, along with former intelligence chiefs Mohamed Mediene Toufik and Athmane Bachir Tartag, as well as leftist party leader Louisa Hanoun.
Corruption and money laundering convictions have also landed two former prime ministers in jail – Ahmed Ouyahia was given a 15-year sentence, and Abdelmalek Sellal 12 years.
On the same charges, former cabinet ministers Youcef Yousfi and Mahdjoub Bedda have each been handed 10-year sentences, while businessmen Ali Haddad, Ahmed Mazouz, Hassan Arbaoui and Mohamed Bairi were each jailed for seven years.
An international arrest warrant has been issued against another cabinet minister, Abdesalem Bouchoureb, who is believed to have fled the country. He has been sentenced in absentia to 20 years in prison.
It is likely these men will appeal against their sentences.
While anti-government protesters have celebrated the prosecution of such figures – whom they dub “the gang” – they remain determined to continue until their demands are met.