Some minutes after the Sierra Leone’s election commission declared former military leader, Julius Maada Bio president after a tight run-off vote, he has been sworn-in, administered his oath of office by the country’s chief justice, Abdulai Cham.

Bio, leader of the Sierra Leone People’s Party and former junta head of the West African nation in 1996, took 51.81 percent of the vote, beating Samura Kamara of the outgoing All People’s Congress, who won 48.19 in the poll on Wednesday, reports CNN.

Bio, a retired Brigadier succeeds President Ernest Bai Koroma, who leaves office after serving two five-year terms. Koroma came to power in 2007 in the shadow of a decade-long civil war that ended in 2002.

Vote counting in the run-off was delayed after disagreement over the tallying method.

The election went to a second round after neither of the candidates achieved the required 55% of the ballot in the first round.

Bio led the first round of elections with 43.3% and Kamara, a former finance minister, followed closely with 42.7%. Sierra Leoneans picked from a pool of 16 candidates in the first round, which was held on March 7.

Bio will be faced with the challenge of reducing extreme poverty and rebuilding the West African country for its 7.3 million citizens.

The country has endured several devastating events in past years, including mudslides last year which left hundreds dead in the capital, Freetown.

This was preceded by an Ebola crisis in 2014 which claimed nearly 4,000 lives.