US Secretary of State Hillary Clinton on Thursday threw her support behind Somalia's embattled president and warned Eritrea to stop sponsoring insurgents turning the country into a terror hub.

Clinton held the highest-level US meeting yet with Somali President Sharif Sheikh Ahmed, whom she described as the best hope of stabilising a nation torn by conflict for nearly two decades and now facing a deadly insurgency.

Clinton offered "very strong support" to Sharif and was ready to meet his requests for unspecified assistance. President Barack Obama's administration has been sending Sharif urgent supplies of arms and ammunition.

She also issued a strong warning to Eritrea, which Washington and its African allies say is funding the Shebab, an Al Qaeda-inspired movement spearheading a three-month-old offensive to topple Sharif.

"It is long past time for Eritrea to cease and desist its support of Al-Shebab and to start being a productive rather than a destabilising neighbour," Clinton told a joint news conference with Sharif.

US officials have warned of possible sanctions and some US lawmakers have pressed for Washington to put Eritrea on a blacklist of state sponsors of terrorism.

Clinton expressed fear that the Shebab would turn Somalia into an extremist haven similar to the border area between Afghanistan and Pakistan -- which has been a top priority for the Obama administration.

"There is also no doubt that Al-Shebab wants to obtain control of Somalia to use it as a base from which to influence and even infiltrate surrounding countries and launch attacks against countries far and near," she said.

"Certainly if Al-Shebab were to obtain a haven in Somalia which could then attract Al-Qaeda and other terrorist actions, it would be a threat to the United States."

Sharif, a young Islamist cleric, was at the forefront of the armed resistance against the 2006 military invasion of Somalia by US allies Ethiopia, but has since joined a UN-sponsored reconciliation process and is perceived to be occupying the country's political middle ground.

Besides his words, observers were also keenly watching his demeanour with Clinton -- specifically, whether he would shake hands. Some devout Muslims frown on any physical contact between a men and women who are not spouses.

Clinton, leaving the news conference, offered Sharif her hand and shook it robustly. Pressed later by a Somali reporter about the handshake, Sharif said, "I don't think it's a problem."

Sharif said he made requests at the meeting but declined to go into specifics.

"There were promises on the security front, on the humanitarian front and for the people injured in the fighting," Sharif said.

"If these promises materialise, they will be very helpful to the people of Somalia," he said.

Sharif defended cooperation with the US, saying: "Somalia needs to have relationships in order to lift the Somali people out of the difficult situation we've found ourselves in."

Clinton promised further support for African peacekeepers in Somalia.

"We are grateful for the bravery and commitment of AMISOM (African Mission in Somalia) troops from Uganda and Burundi. The United States is proud to offer financial support -- nearly 150 million dollars over the past two years -- and additional funds in the coming months."

Clinton then wrapped up her two-day stay in Kenya -- the country where Obama's father was born -- and flew out to South Africa, the second stop on a seven-nation tour of Africa that is her longest trip since becoming the top US diplomat six months ago.

In South Africa, she will take on another hotspot by seeking African pressure on Zimbabwean President Robert Mugabe to institute democratic and economic reforms.