U.S. Secretary of State John Kerry made a surprise visit to Somalia on Tuesday to show support for the war-torn country and its efforts to restore normalcy after more than 20 years of chaos.

Kerry traveled from Nairobi to Mogadishu, becoming the first sitting U.S. secretary of state to visit Somalia. He spent about 3½ hours in the capital, a visit that was not publicly announced in advance.

Speaking at the airport, Kerry said he was impressed with the country's progress toward peace and stability.

"I visited Somalia today because your country is turning around. Three years have passed since a provisional constitution was adopted and a parliament sworn in," Kerry said.

He also noted that, with help from AMISOM, the African Union peacekeeping mission, "Somali forces have pushed al-Shabab [extremists] out of major population centers. A determined international effort has put virtually all of Somali pirates out of business."

The U.S. envoy later met with regional leaders of Somalia's federal states and representatives of civil society groups.

'Progress has been made'

U.S. Secretary of State John Kerry (L) meets with President Hassan Sheikh Mohamud, second from left, Prime Minister Omar Abdirashid Ali Sharmarke, fourth from right, and regional Somali leaders at the airport in Mogadishu, Somalia, May 5, 2015.

"​Great progress has been made and you have all contributed to that progress," Kerry told the regional leaders.

Somalian Foreign Minister Abdisalam Hadliye Omer told VOA's Somali service the visit "shows the world that Somalia government is functioning and that Somalia has turned around and is open for business."

The top U.S. diplomat thanked regional countries for contributing troops to the AU Mission to Somalia, and applauded Somali leaders for working toward the country's "Vision 2016" goals, which include elections.

"The government is also working toward finalizing the constitution and holding democratic elections in 2016," Kerry said. "You, all of you, must have a voice in this process. Your leaders affirmed to me today that they are committed to making progress."

Kerry met separately with civil society members, including Somali peace activist Fartuun Adan, a 2013 international "Women of Courage" award recipient, as well as Ilwad Elman and Khadija Isse, a former and a current member of President Barack Obama's Young African Leaders Initiative.

The United States remains the No. 1 financial donor to the AU force as well as the Somali government, which, after years of limited power, is slowly exerting its authority across Somalia.

Somalia's foreign minister also told VOA that Kerry and Somali officials discussed reopening a U.S. embassy in Mogadishu.

Kerry indicated much the same in his remarks.

"In recognition of the progress made and the promise to come, I am pleased to announce that the United States will begin the process of establishing premises for a diplomatic mission in Mogadishu," he said. "We are upgrading our diplomatic representation."

Currently, U.S. diplomats dealing with Somalia operate out of Kenya’s capital, Nairobi.

As part of his regional tour, Kerry earlier this week visited Kenya to discuss counterterrorism efforts. The country is contributing troops to the African Union peacekeeping mission and it also hosts hundreds of thousands of Somalis at its refugee camps.

In a recent interview with VOA Somali Service, President Mohamud called al-Shabab an "enemy that has no dignity." He commented shortly after the Somali-based militant group attacked Kenya's Garissa University College last month, killing 148 people.

After the Garissa attack, some Kenyan political leaders called for the repatriation of Somali refugees at the Dadaab complex in northeastern Kenya. They accused the refugees of playing a role in Kenya's insecurity.

US aid to African Union effort

The United States has provided training, equipment and drone strikes to the African Union-led effort that has ousted al-Shabab from major Somali cities.

In a Tuesday briefing, a senior State Department official said the Somali government still has work to do when it comes to taking control of its own security.

"Somali National Army – the 'national' is missing," the official said, noting the government's efforts to bring clans and sub-clans under the "umbrella" of a national army are still "a work in progress."

Kerry's Mogadishu visit took place as the United States has been working to broaden its engagement with Somalia.

In February, U.S. President Barack Obama nominated career diplomat Katherine Dhanani to serve as the first U.S. ambassador to Somalia since 1991. If confirmed by the Senate, she would lead the U.S. Mission to Somalia, which is located in Kenya.

After returning to Kenya from Somalia, Kerry will travel to Djibouti, which hosts the U.S. military hub for the Horn of Africa region. The country has also served as a stopping point for foreigners fleeing unrest in Yemen.

From Djibouti, Kerry travels to Riyadh for talks with senior leaders on regional security.

He is expected to wrap up his trip in Paris, where he will meet with French Foreign Minister Laurent Fabius and the foreign ministers of Gulf Cooperation Council countries, plus participate in World War II Victory Day commemorations.

Americans flee Yemen

In Tuesday's briefing, the senior State Department official said more than 500 Americans are known to have departed from Yemen and traveled to Djibouti, as well as an equal number of family members.

The official said Djibouti has been relatively lenient with its entry requirements, while other countries have imposed restrictions.