Nigerian President Muhammadu Buhari has suspended the country's Chief Justice, Walter Onnoghen, three weeks before the general election in which he is seeking a second term in office.

His main challenger - Atiku Abubakar - called the decision "an act of dictatorship".

Mr Onnoghen is facing charges at a tribunal relating to failure to declare his personal assets before taking office in 2017.

Nigerian law requires senior civil servants and government officials to disclose personal assets as a way of fighting corruption.

Ibrahim Tanko Muhammad was named as acting Chief Justice, Mr Buhari's aide tweeted:

There were no details on the reason behind the move.

President Buhari has often accused the judiciary of frustrating his anti-corruption fight by unnecessarily delaying court cases or dismissing them altogether.

But the charges against the top judge relating to a failure to declare his assets and his subsequent suspension just before elections are widely seen as politically motivated.

As the head of the judiciary, Nigeria's chief justice plays a vital role in settling election disputes.

The suspension comes less than 24 hours before Mr Onnoghen is scheduled to swear-in members of election tribunals.

It is not immediately clear if the president has the powers to suspend the chief justice, who is currently standing trial at the Code of Conduct Tribunal.

On Thursday, an appeals court ordered the tribunal to stop the trial of Justice Onnoghen, saying it lacks the powers to do so.