Somalia's President Abdullahi Yusuf Ahmed has told parliament he is resigning.
The news comes a few days after the resignation of the man he had recently appointed as prime minister.
Ex-Prime Minister Mohamed Mahamud Guled quit a week earlier, saying his appointment was destabilising the government.
Mr Yusuf, elected four years ago, said he had failed to bring peace.
The parliament speaker is to take over leadership responsibilities.