Article published on the 2009-07-17 Latest update 2009-07-17 17:33 TU
"I have resigned from my functions as prime minister," Ndong, 63, said from his home in Libreville. Ndong, who is married to the daughter of the late president, had led the government since January 2006.
He failed to win a nomination from his ruling Democratic Party ahead of the August 30 poll.
The election was prompted by the death last month of Omar Bongo Ondimba, who had been Africa's longest-serving ruler, holding power for 41 years.
Gabon is currently being ruled by Senate speaker Rose Francine Rogombe, who was swiftly sworn in as interim president to prevent a power vacuum.
The Democratic Party is expected to officially endorse Ali as its candidate in a congress on Sunday.