Somalia's new President Mohamed Abdullahi Mohamed has chosen political newcomer Hassan Ali Khaire, a former oil company executive, as the country's prime minister.

Thursday's appointment was announced shortly before Mohamed, also known as Farmajo, departed to Saudi Arabia for his first foreign trip since his election.

"The president has requested Somali citizens to work with the prime minister," a statement on state radio website Radio Muqdisho.net said.

Inside Story - Why does Somalia matter?

Mohamed took office peacefully this month after legislators selected him from 21 possible candidates. A dual US-Somali citizen with a reputation as a technocrat, he has promised to tackle hunger, corruption and violence in Somalia, which has been mired in civil war for a quarter of a century.

Khaire is a dual Norwegian citizen who once worked as a primary school teacher in Norway and also for the Norwegian Refugee Council before joining British energy explorer Soma Oil and Gas.

The new prime minister had resigned from his job as the executive director for Africa, to allow him to take up the job of prime minister, Soma Oil said in a statement on Thursday. He had also given up all his shares in the firm, it added.

His selection is seen by some as a nod to balancing clan interests in the Horn of Africa nation. Khaire is a member of the Hawiye clan, as is former President Hassan Sheikh Mohamud, whom Mohamed defeated in the election earlier this month. Mohamed is with the Darod clan.

READ MORE: Somalia in a Snapchat, more than just violence

The new president, who was inaugurated on Wednesday, has vowed to make security a priority in a country where armed group al-Shabab frequently carries out attacks in the capital, Mogadishu, and elsewhere. On Sunday, a car bomb in the capital killed at least 34.

Al-Shabab earlier this week denounced Mohamed's election, calling him an apostate, and vowed to keep fighting. 

Mohamed's trip to Saudi Arabia is viewed as signaling a significant shift in Somalia's regional alliances, according to some analysts.

A government statement said that he would meet Saudi King Salman to discuss strengthening the countries' relationship, security and aid for Somalia's drought.

"Having travelled to Saudi Arabia for his first foreign trip as a president, the new Somali president is breaking the long tradition by Somali leaders who have paid their very first foreign trips to Ethiopia, which is called by many as the Mecca of Somali leaders," Mohamed Sheikh Abdi, a Somali political analyst based in Mogadishu, told The Associated Press news agency.

"This indicates that the new president now favours an alliance with Arab countries more than others."

Source: News agencies