FREETOWN, Sierra Leone — Sierra Leone's election commission declared main opposition candidate Julius Maada Bio as the West African nation's new president Wednesday, giving the opposition party its first presidency in 10 years.

Chief Justice Abdulai Charm swore in the new leader along with Vice President Mohamed Juldeh Jalloh just hours after the announcement. Bio pledged to govern for all Sierra Leoneans at the ceremony.

Bio won Saturday's runoff vote with 51.81 percent of valid votes cast, the National Electoral Commission said. The former military leader running for the Sierra Leone Peoples Party beat ruling party candidate Samura Kamara, who received 48.19 percent of the votes.

More than 2.5 million people, or 81 percent of eligible registered voters, cast ballots in the runoff, said election commission's chairman, Mohamed N'Fah Alie Conteh.

Any registered voter has seven days to petition to the Supreme Court against the results. This was Bio's second bid for the presidency. He lost in 2012.

Tensions rose in the West African nation of 7 million people after neither the ruling All Peoples Congress party candidate nor Bio won the March 7 first round election outright. The Sierra Leone Peoples Party has not held the presidency since 2007.

The runoff vote had been set for March 27 but was delayed after a ruling party member filed a court challenge alleging irregularities in the first round and a temporary injunction was issued, stalling preparations. The high court lifted the injunction last week, allowing the second round to take place Saturday.

The winner will now lead efforts to continue rebuilding the country after the devastating 2014-2016 Ebola epidemic as well as a deadly mudslide in August that killed some 1,000 people in the capital, Freetown.

The election is the fourth since Sierra Leone's brutal civil war ended in 2002, and the previous vote in 2012 was largely peaceful.

Outgoing President Ernest Bai Koroma has served two terms and was barred by the constitution from running again.