MOGADISHU, Somalia (AP) — A U.S. congressman visited Somalia’s capital on Tuesday, the first visit in years by a member of Congress to what until recently was considered one of the world’s most dangerous cities.

Keith Ellison, a Democrat from Minnesota, said his visit to Mogadishu fulfilled a request from his constituents with ties to Somalia. Minnesota has one of the largest populations of Somali-Americans in the U.S.

Ellison, the first Muslim elected to Congress, noted that the U.S. government in mid-January recognized the Somali government for the first time since the country fell into anarchy in 1991.

“We’ve seen 20 years of warlordism, 20 years of terrorism, of refugees streaming across the border into every neighboring country, piracy in the gulf,” Ellison told The Associated Press in a phone interview from neighboring Kenya.

“But a stable Somalia will bring this all to an end, and I think we need to be a part of the solution. I’m telling you, investing money in Somalia is sending good money after good. We should now see Somalia as a trading partner and a partner of educational exchanges.”

Ellison was greeted by Somali President Hassan Sheikh Mohamud. The president said that Ellison’s visit was a big day for Somalia.

Mogadishu has experienced about 18 months of relative peace, after the August 2011 ouster of the Islamic extremists of al-Shabab from the capital by African Union forces. Following the advice of security advisers, Ellison did not travel beyond Mogadishu’s airport complex, the most secure part of the city, but he said he wished he had been able to and hopes to on a future trip. He said he never felt in any danger.

One of the issues Ellison met with Somali officials about was the financial remittances often sent by Somalis in the U.S. back to family members in Somalia. Such remittances have become harder to make over fears that people sending money could be accused of aiding a terrorist organization such as al-Shabab.

Ellison said he thinks he made “real progress” on the problem. He said he also got a better grip on how to handle refugee issues and Somalia’s security needs.

Ellison said that being Muslim gives him an advantage in a Muslim country like Somalia because he knows religious greetings and customs, but that it wasn’t a major factor in his trip there or in his meetings.

Somalia has seen great political progress over the last year, including voting in a new interim constitution, and electing a new president and parliament. International supporters say Mohamud’s government is a step toward moving the country out of its failed-state status, but that much more remains to be done in a country bloodied by two decades of war.

In one sign that should give Mogadishu residents hope, Ellison said he met with Somali business leaders who grew up in the U.S., Canada, and U.K. who have returned to help Somalia rebuild. He said that fact communicated great optimism for the future of the country.

“It feels great to be a part of the story of the new Somalia,” Ellison said. “They’re handling their business politically. They’re trying to handle their business economically. They need a little help, but the alternative is what? Twenty more years of refugees spilling into Kenya, Ethiopia and Uganda? Twenty more years of piracy? Twenty more years of al-Shabab? People are saying no. They’ve had enough.”

(© Copyright 2013 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)