Hassan Sheik Mohamud Inaugurated as Somalia's President GALKAYO, Somalia (AP) - Somalia's new president, Hassan Sheik Mohamud, was inaugurated Sunday amid tight security in the capital, Mogadishu, four days after he survived an assassination attempt. Mr. Mohamud, a teacher and activist, was elected by lawmakers last week in a contest against Sheik Sharif Sheik Ahmed, who led the transitional government. The attempt on Mr. Mohamud's life just after his election highlighted the security challenges he faces as he takes the helm of a volatile country that has not had a stable government for more than two decades. Mr. Mohamud acknowledged the difficulties, saying in his inauguration remarks that security was the nation's paramount issue. He promised to be an advocate for democracy and to create "an effective justice system" that serves all Somalis. He also said that his government would "deliver a new democratic beginning." His predecessor, Mr. Ahmed, said in his remarks that he was happy that a degree of security had returned to Mogadishu. He wished Mr. Mohamud success. The political process that resulted in Mr. Mohamud's election, backed by the United Nations, was condemned by Islamist militants, who said it was manipulated by the West. But Mr. Mohamud has broad international support to try to bring stability to his troubled nation. The inauguration was attended by regional leaders, including the prime minister of Ethiopia and the president of Djibouti. Augustine Mahiga, the top United Nations representative to Somalia, said Mr. Mohamud's inauguration was a watershed moment for Somalia. "This marks the end of the transitional period and the beginning of a new era for Somalia," Mr. Mahiga said in a statement. Somalia has made much progress over the past year. Rebels with the Shabab militant group were forced out of Mogadishu in August 2011, allowing businesses to thrive and the arts and sports to return. The militants have either fled to northern Somalia and Yemen, or have retreated to Kismayo, the last major town in Somalia that they control. But occasionally they succeed in breaching security to stage terrorist attacks in Mogadishu, like the assassination attempt on Wednesday by suicide bombers who tried to infiltrate a hotel where the president was addressing reporters. Mr. Mohamud faces an uphill task in trying to unify the fractious country in the face of the Islamist insurgency, guarantee food supplies and rebuild the bombed-out infrastructure and a variety of civic institutions. Another challenge is the endemic corruption that has plagued previous governments. Somalia has had transitional administrations since 2004, but it has not had a functioning central government since 1991, when warlords overthrew a longtime dictator and then turned on one another, plunging the nation into chaos. Last month, Somali leaders endorsed a new provisional constitution that expands rights for citizens. The United Nations hopes that Somalis will be able to vote on the document.