President Umaru Yar'Adua has been absent from Nigeria for weeks
The Nigerian cabinet has been ordered by the federal court to decide within 14 days if ill President Umaru Yar'Adua is fit to lead the country.
The president has been in Saudi Arabia for two months, receiving treatment for a heart condition.
The court ruling directed the cabinet to pass a resolution about whether he "is incapable of discharging the functions of his office".
The president's absence has raised concerns about a power vacuum.
The Federal High Court ruled that cabinet should hear testimony from five doctors, one of whom should be the president's personal physician.
If cabinet decides that the president is not fit to carry out his duties, the vice-president would take over, the court ruled.
President Yar'Adua is being treated for inflammation of the lining around the heart and has a long-standing kidney complaint.
The court was responding to a law suit brought by opposition activist Farouk Adamu Aliyu.
He had asked for the judges to sack the president over his failing health and for failing to abide by the provisions of the constitution.
On Thursday, more than 1,000 people gathered in Lagos to protest against Mr Yar'Adua's prolonged absence.
Some carried placards saying: "Enough of the offshore president and a people's constitution now."
The protesters argue that when the president left the country to go to hospital he did not hand executive powers to his deputy, as required by the constitution.