ABUJA (Reuters) - Nigeria’s ruling party won a governorship election in southwestern Ekiti state, officials said, unseating the opposition and giving President Muhammadu Buhari a boost ahead of national polls next year.

Slideshow ( 2 images )

Kayode Fayemi of the All Progressive Congress (APC) took almost 45 percent of the vote held on Saturday, the electoral commission announced on Sunday.

The opposition People’s Democratic Party (PDP) rejected the result, alleging electoral fraud, a claim that the Independent National Electoral Commission (INEC) rejected.

The vote had been seen as a test of the ruling party’s popularity. The APC split earlier this month when a faction declared it no longer supported Buhari’s government, later forming an alliance with the opposition and threatening Buhari’s hopes of securing a second term in 2019.

Fayemi, who was governor of Ekiti between 2010 and 2014, resigned as Buhari’s minister for mining and steel development to contest the race against several opposition parties in a state where the PDP had been critical of the government.

As minister, Fayemi tried to revive Nigeria’s mining sector and had been in discussions with the country’s sovereign wealth fund to create a $500 million fund for exploration. Some of the plans are yet to materialize.

Buhari congratulated Fayemi and the electoral body for the conduct of the vote.

The PDP, in a statement, rejected Fayemi’s victory, saying that results from polling centers showed that its candidate won the election.

“The People’s Democratic Party rejects in its entirety the results concocted by the All Progressives Congress, the Independent National Electoral Commission and security agencies, in the governorship election in Ekiti state and declared by INEC,” the PDP said.

The opposition party said it was recording cases of electoral fraud and would take steps to reclaim its mandate.

The INEC said the process of collating results was transparent. “If the PDP has a different result, we hereby call on them to produce it,” it said.

Nigeria is preparing for presidential, parliamentary and state governorship elections from February next year. Political parties must select their candidates for the election between Aug. 18 and Oct. 7.

Governors are among the most powerful figures in Africa’s most populous nation. Some control budgets bigger than those of many African countries and play a significant role in selecting presidential candidates.

Fayemi’s victory consolidates the ruling party’s position in Nigeria’s southwest, a key region that helped the APC, a merger of four regional parties, win the last election.