Gaborone, Botswana: Botswana President Ian Khama saw off the biggest challenge posed by the opposition since independence, winning a second term in power on Sunday as his ruling party secured a majority at the polls.

Khama "has been re-elected as the President of the Republic" said High Court Chief Justice Maruping Dibotelo, after his party the Botswana Democratic Party (BDP) garnered at least 34 of the 57 parliamentary seats.

With tallying still ongoing for seven seats, it is unclear if the ruling party will match its previous election result of 41 seats.

An opposition coalition called the Umbrella for Democratic Change (UDC) has meanwhile won 14 seats, while another opposition group, Botswana Congress Party, has secured two.

Khama, 61, who is the son of the country's first president, Seretse Khama, will be inaugurated on Monday.

Friday's general elections had been billed as the most challenging for the ruling party, which has governed the diamond-rich, sparsely populated country bordering South Africa since it gained independence from Britain in 1966.

Opposition parties had in particular made inroads in urban areas, following the formation in 2010 of a breakaway party, the Botswana Movement for Democracy (BMD).

The BMD is now part of the UDC coalition, led by Duma Boko, which has won seats in districts which were once strongholds of the ruling party, including in capital Gaborone.

"The UDC did well for a new party, but naturally we were hoping for more votes to topple the BDP. It was never to be," said Seakamela Motsoaledi, a UDC party representative.

Falling diamond revenues

Although seen as one of Africa's success stories, Botswana has recorded rising unemployment since 2009 as the global economic crisis sent diamond prices falling.

The dropping diamond revenues had in turn forced Khama's government to halt planned investments in recent years.

During the election campaign, Khama admitted the failure of his government to stop unemployment rates from rising.

Among key challenges that he faces is the task of diversifying the country's economy.

International observers were satisfied that the polls had been free, although questions were raised over election funding and the poor representation of female candidates in the party lists.

Regional blocs, the Southern African Development Community (SADC) and the African Union, said the eleciton had been "credible and reflecting the will of the people."

"Botswana remains unique in Africa in that it has enjoyed 48 years of sustained and uninterrupted democracy," said the SADC mission.

However, the mission noted the inadequate voter education ahead of the polls, due to a lack of funding.

The SADC also urged the authorities to encourage the participation of women in a vote dominated by male candidates.

The AU called on Botswana to provide public funding of political parties to "ensure fairness during the electoral process and improve fairness."

"We are aware that not many countries in Africa can afford to provide funding for political parties, but this is part of the AU statutes," said Joyce Banda, the AU head of observer mission and former president of Malawi.