East Timor's president Jose Ramos-Horta has announced he will step down in May after failing to win re-election.

He finished third behind Fretelin party candidate Francisco Guterres and the former army chief Taur Matan Ruak.

The two men will contest a run-off poll next month.

Dr Ramos-Horta says he has not ruled out working with whoever takes power.

"My first responsibility is to make myself available. If they need help, I will be one SMS away," he said.

"Concretely, about accepting a porfolio or any other mission, I haven't thought about that because I'm still president."

Dr Ramos-Horta did not have the backing of a major party in the election and had lost the support of prime minister Xanana Gusmao.

Neither of the leading candidates gained an absolute majority in the vote and they will now compete in a second round of voting on April 16.

Dr Ramos-Horta, a popular leader who survived a 2008 assassination attempt, said on Saturday that if he was not re-elected he would have "to struggle to choose what to do".

The 62-year-old added that he had a long-standing commitment to a Western literary agency to write a book.