Gabon's President Ali Bongo, who has spent a month in treatment at a Saudi hospital, has left Riyadh, state media in the kingdom reported, without saying where he went.
As he departed King Salman airbase on Wednesday night, Bongo was seen off by officials from the Saudi foreign ministry,the official Saudi Press Agency said.
The president's wife said this week in a post on Facebook that he would be transferred to the Moroccan capital Rabat on Wednesday to continue his recovery.
Bongo, 59, had been at the hospital in Saudi Arabia since October 24 when he fell ill at an economic forum.
After an extended period of silence, the Gabonese presidency eventually admitted he was "seriously ill" and had undergone surgery, while insisting he was on the mend.
His recovery would take weeks, or even days, according to a source in the presidency.
The Gabonese president and Morocco's King Mohammed VI have had a close relationship since their youth.
Over the past month, the Gabonese presidency has released only two statements on Bongo's health, first saying on October 29 that he had been taken to hospital "suffering from severe fatigue".
Then on November 11, Bongo's office admitted he was "seriously ill" and had undergone surgery.
Lack of official news -- along with memories of the secrecy-shrouded death of Bongo's father Omar Bongo in 2009 after decades at the helm -- had sparked numerous rumours, including speculation he was incapacitated or even dead.
Earlier this month, a foreign source close to Bongo and his French-born wife Sylvia told AFP the Gabonese president had had a stroke.