Somalia's new prime minister has named a leaner cabinet as the country attempts to establish its first fully functioning government after decades of anarchy.

Abdi Farah Shirdon on Sunday announced the appointments of 10 cabinet ministers, downsizing the executive from the previous 18 in the transitional government whose mandate ended in August. He said his government would restore security and rebuild Somalia's economy.

Shirdon appointed two female ministers, including the first female Foreign Minister Fowziya Yusuf Aden as well as Maryan Qasim who was appointed Public Services Development minister. Somalia has been ravaged by war for two decades after warlords overthrew a longtime dictator in 1991 and then turned on each other. The government, backed by African Union troops, is currently battling islamist extremist rebels linked to al-Qaida.