President Muhammadu Buhari has suspended Nigeria's top judge pending the outcome of his disputed trial on corruption charges, the government said on Friday.
"President @MBuhari suspends the Chief Justice of Nigeria (CJN) Walter Samuel Nkanu Onnoghen and appoints Mr Ibrahim Tanko Muhammad as acting CJN," presidential aide Bashir Ahmad tweeted.
The announcement came just weeks away from presidential and parliamentary elections on February 16 - a contest in which Onnoghen would rule if any dispute emerged about the outcome.
The judge was charged on January 12 of breaching the code of conduct for public officials by failing to declare several foreign currency bank accounts.
The move - after a complaint reportedly made by Buhari's former spokesperson - was immediately condemned by opposition parties as a government attempt to manipulate the judiciary.
The chief justice is the head of the Supreme Court, which would hear any complaint about the results of next month's vote, at which Buhari is seeking re-election.
The former military ruler, from the All Progressives Congress (APC) party, is expected to be run close by Atiku Abubakar, from the main opposition Peoples Democratic Party (PDP).
Both sides were accused of vote-buying in recent governorship elections while Abubakar and the PDP have repeatedly warned the ruling party is trying to rig the result.
Cheta Nwanze, an analyst with Lagos-based SBM Intelligence, told AFP the Onnoghen case was "a clear indication they (the APC) are panicking" about the results.
Buhari delayed the appointment of Onnoghen, after he became acting chief justice in November 2016.
His appointment was only confirmed by parliament in March 2017, prompting speculation Buhari was not keen to endorse his candidacy.
Onnoghen has since criticised what he said was the politicisation of judicial appointments in Nigeria and cleared Senate leader Bukola Saraki on corruption charges.
Saraki has accused the government of targeting him because he was not its first choice as leader of the upper house of parliament.
Buhari has been accused of surrounding himself with ministers, advisors and officials from the predominantly Muslim north, his home region.
Onnoghen is from Cross Rivers state in the Christian-majority south, while Muhammad is from the northeastern state of Bauchi.
Muhammad was sworn in at the presidential villa Aso Rock, an AFP correspondent said.
Onnoghen is due in court at the Code of Conduct Tribunal next week.
But on Thursday he secured an interim Court of Appeal injunction ordering the lower court to halt proceedings, pending a ruling on his application to throw out the case.
Sign up to News24's top Africa news in your inbox: SUBSCRIBE TO THE HELLO AFRICA NEWSLETTER