A UN judicial expert says the Nigerian president broke international rules when he recently suspended the country's Chief Justice.
President Muhammadu Buhari suspended Walter Onnoghen last month over allegations that the judge had failed to declare his assets.
The UN special rapporteur on the independence of judges and lawyers, Diego Garcia-Sayan, said such a decision should be taken by an independent judicial council or a court.
He said dismissing judges without following legal procedures was incompatible with the independence of the judiciary.
The suspension of the chief justice has drawn international criticism.
As Nigeria's top judge he could play a key role in any disputes that arise from this weekend's elections.