President Umaru Yar'Adua has heart and kidney problems
Both houses of Nigeria's National Assembly have passed a motion for sick President Umaru Yar'Adua to hand power to his deputy until he recovers.
The BBC's Ahmed Idris in Abuja says the move among the political elite to back the vice-president is unprecedented.
The ruling party alternates leadership between north and south, and Mr Yar'Adua's northern backers wanted to keep his southern deputy out of office.
Mr Yar'Adua has been in hospital in Saudi Arabia since last November.
His absence has sparked legal challenges, cabinet splits and mass protests.
It has led to a freeze in government business and threatened progress made in combating unrest in the oil-rich Niger Delta.
Our correspondent says members of the Senate, House of Representatives and state governors are usually loyal to the president, and the office of vice-president carries little weight.
YAR'ADUA ILLNESS TIMELINE
23 November 2009 Goes to hospital in Saudi Arabia
26 November Presidential doctors say he has pericarditis - inflammation of the heart lining
23 December First court case filed urging him to step down
5 January 2010 Two more court cases filed, rights group wants president declared "missing"
12 January President gives first interview from Saudi Arabia
27 January Cabinet declares president fit
29 January Court says no need for formal transfer of power
But the governors decided last week to back Vice-President Goodluck Jonathan to become acting president and have been lobbying for the assembly to do likewise.
The assembly carried the motion declaring that Mr Jonathan "shall henceforth discharge the functions of the office of president, commander-in-chief of the armed forces of the federation, as acting president".
Senator leader David Mark made it clear that the power transfer was temporary.
The move appears to have staved off attempts by some senators to have Mr Yar'Adua impeached for failing to inform the assembly in writing of his "medical vacation".
Mr Mark said that an interview Mr Yar'Adua carried out with the BBC's Hausa service on 12 January had effectively provided the assembly with the notice it needed.
"We came to the conclusion that the president, through his declaration transmitted worldwide on the BBC, has furnished this parliament with irrefutable proof that he's on medical vacation in the kingdom of Saudi Arabia," said Mr Mark.
However, some analysts have suggested that the assembly's motion is not legally binding and could face court challenges.
Others say the move has laid down a challenge to the presidency and the cabinet - due to meet on Wednesday - to accept the handover, or risk inflaming public opinion.
The cabinet has previously insisted that the president is able to continue in office, although splits subsequently emerged within ministerial ranks.
Mr Yar'Adua has not been seen in public since flying to Saudi Arabia for medical treatment in November.
He is suffering from an inflammation of the lining around the heart and has long suffered from kidney problems.