With the 2015 presidential elections looming, Nigeria's electoral body will have to learn from its recent mistakes, and quickly.
Nigeria's Independent National Electoral Commission (INEC) has continued to come under attack over its troubled handling of governorship elections in the south-eastern state of Anambra last month.
The 16 November vote, won by Willie Obiano of the All Progressives Grand Alliance (APGA), was seen as a critical test for INEC with the 2015 presidential polls fast approaching.
But unfortunately, the vote was fraught with irregularities, such as the delayed receipt of electoral materials at various polling stations, as well as accusations of outright fraud and collusion amongst INEC agents.
This led the All Progressives Congress (APC) to call for the election results to be annulled and the poll re-run.
INEC Chairman Attahiru Jega rejected this request, but acknowledged that the conduct of the elections had been flawed and emphasised his commitment to finding out what happened.
"We are not leaving any stone unturned at unravelling what actually transpired," he said, adding, "We cannot afford to lose hope. We will do better in the future."
The APC has now taken the issue to court, but the importance of INEC's conduct exceeds far beyond just Anambra State.
With many Nigerians already preparing for the 2015 elections, and the presidential race looking like it could be tighter than any in Nigeria's history, the electoral commission's reputation for independence and competence could be more significant than ever.
The Anambra debacle
Before the first votes were even cast in Anambra's election last month, observers were watching keenly as INEC attempted to demonstrate that it had continued to evolve and improve since its founding in 1998.
Back then, and in the commission's early years, its reputation was one of corruption and an inability to provide a suitable electoral environment.
Under the Chairmanship of Jega, Vice Chancellor of Bayero University in Kano, who took over in 2010, the fortunes of the commission witnessed improvements, with many seeing the 2011 elections as Nigeria's best-run yet.
Jonah Isaac Onuoha, a professor of Political Science at the University of Nigeria, told Think Africa Press: "Jega has done well since he became INEC chairman.
Corruption has decreased and the level of organisation and professionalism in the commission has increased. You can't compare him to past Chairman Maurice Iwu whose services were always readily available to the highest bidder."
However, as the Anambra State elections suggest, there is still much work to be done. The Transition Monitoring Group (TMG), for example, decried "serious" shortcomings in the poll and reported that at noon on the day of voting around 60% of polling units had still not received the necessary election materials.
Meanwhile, many voters - including the People's Democratic Party's (PDP) candidate for the governorship, Tony Nwoye - complained that they couldn't find that their names were not on the register despite the fact they had valid voter cards. Nwoye claimed that over 30% of his supporters had the same problem.
"Voter registration and sensitisation in the state prior to the elections were greatly mismanaged," says Ugu Chukwudi, a political analyst and resident of Anambra State. "Emphasis was more on security than the actual election. INEC seemed confused amongst the multitude of difficulties."
In the end, INEC cancelled the results from 210 of the state's 4,608 polling stations due to their problems with voting and scheduled repeat elections in those areas for 30 November.
The APC, however, insisted on a full re-run, claiming that the problems ran deeper than just irregularities in at some stations, and announced that they would be boycotting the supplementary vote.
"We will not be a party to what is obviously a travesty of election by a self-discredited and conniving electoral umpire," said an APC spokesperson.
The PDP's Nwoye made similar allegations of deliberate INEC foul play, claiming the election had been "heavily manipulated by INEC in collusion with security agents in favour of Governor Peter Obi's preferred candidate, Willie Obiano."
Despite the boycott and controversy, however, the 30 November vote went ahead, and the next day, INEC announced that Obiano of the APGA had won with 180,178 votes, beating the PDP's Nwoye with 97,700 votes, Chris Ngige of the APC with 95,963, and the Labour Party's Ifeanyi Ubah with 37,495.
The APC has now initiated court proceedings, calling for the results to be invalidated, and it seems likely that a protracted legal battle will loom over the early days of Obiano's tenure.
INEC's management of the Anambra State elections and its handling of the controversy that followed call into question the improvements the commission was perceived to have made in recent years.
And unfortunately for the commission, it does not have long to resolve its internal problems and reassure the population that it is fully competent, independent and trustworthy.
Gubernatorial elections are set to take place in Ekiti and Osun states in 2014, and there is not long to go until the 2015 presidential elections.
INEC itself seems well-aware of that its performance will have to improve. "There were several issues in Anambra and I understand these could be viewed as problematic or negative," said Kayode Idowu, chief press officer to Jega.
"Lessons must be learned but we should look at it as an opportunity to enhance and fine tune our operations for 2015."
Nigerians will be hoping this commitment is genuine. After all INEC has many serious issues to contend with from logistical mishaps to voter apathy to accusations of political connivance amongst INEC agents.
Fortunately for Jega, the trust bestowed on him largely remains intact for now. But if it wears off and the 2015 elections become marred in controversy and allegation, the recent disputes in Anambra could pale in comparison to what Nigeria might expect.