Somalia's president said Monday he is resigning as the head of his country's UN-backed government after four years of leading one of the most violent, impoverished countries in the world. Abdullahi Yusuf made the announcement in a speech Monday before parliament in Baidoa - one of the only towns controlled by the weak government. The speaker of parliament will stand in as acting president until elections are held, he said. "When I took power I pledged three things," Yusuf said in his address, which was broadcast on radio across the country. "If I was unable to fulfill my duty I will resign. Second, I said I will do everything in my power to make government work across the country. That did not happen either. Third, I asked the leaders to cooperate with me for the common good of the people. That did not happen," he said. He said he would hand in his resignation letter later Monday.