By Abdi Sheikh

MOGADISHU (Reuters) - Somalia's new government said on Monday it was pursuing talks to resolve rival claims for control in the south that have stoked fears of a return to the clan wars that pitched the nation into anarchy two decades ago.

A local assembly on Thursday declared a former Islamist warlord, Ahmed Madobe, president of Jubaland. Madobe is not viewed favorably by Mogadishu and within a day two other men had pronounced themselves president, including Barre Hirale, a former warlord and defense minister seen as pro-government.

How the fate of Jubaland and its port city Kismayu is resolved will be a litmus test for Somalia as it rebuilds from the ruins of war and cements a fragile peace, a quest hampered by the central government's weakness outside Mogadishu.

Islamist militants or clan militias, hovering in the wings, could swoop if the competition for Kismayu turns violent. But guns have stayed silent so far and the government's stated determination to seek talks could help it stay that way.

"It will take time but there is no going back to civil war. That is not an option," Ahmed Adan, a spokesman for Prime Minister Abdi Farah Shirdon Saaid, told Reuters, calling for "peaceful and authentic negotiations".

On the ground, several Kismayu residents said they still feared a resurgence of the gun-toting militias that carved up the Horn of Africa state after civil war erupted in 1991.

"Kismayu is returning to the era of warlords. It is each clan and its own might," Dahaba Olad, a mother of eight, said by telephone. "We don't want war, but it is inevitable."

Shopkeeper Safia Ali said she was doubtful southern Somalia's clan rivalries could be overcome. "Sooner or later there will be civil war in Kismayu," Ali said.

Their fears are fuelled by Kismayu's strategic position.

"Kismayu is perhaps the biggest prize to be had in Somalia," said J Peter Pham of the U.S.-based Atlantic Council. "It has the biggest working seaport in the country, two airports, and is surrounding by potentially rich agricultural lands."

DIVVYING UP POWER

Regional capitals and Western donors are nervous of any reversal of gains made in Somalia by African Union peacekeepers in the fight against the Islamist al Shabaab rebels, seen as a threat to stability in east Africa and well beyond.

President Hassan Sheikh Mohamud's cash-strapped federal government exerts little authority beyond Mogadishu. How to divvy up power between the center and regions is a thorny issue, particularly when Kismayu's lucrative port is at stake.

The prime minister's office said a high-level government delegation was in negotiations with the rival parties. There is, though, a widespread feeling among Somalia's southern clans that Mogadishu is not listening to their demands.

Even so, a mixture of exhaustion with conflict and a desire to capitalize on Kismayu's trade flow could help peace to hold.

"Among the clans I don't think there is any appetite for civil war. There is, though, a real appetite for control of power and resources," said Abdi Aynte, director of the Mogadishu-based Heritage Institute for Policy Studies.

Madobe, who some see as close to Kenya, was governor of Kismayu during an Islamist administration that was routed when Ethiopian forces, with the tacit backing of the United States, waged an offensive in Somalia from 2006 to 2009.

He was held in Ethiopia for two years. After his release Madobe and his powerful Ras Kamboni militia sided with Kenyan troops against al Shabaab from late 2011.

Kenya's land forces swept into Somalia to secure the porous frontier the two share and are now part of a near 18,000-strong African Union peacekeeping force fighting al Shabaab. A Kenyan ally in Kismayu could provide Nairobi with a welcome buffer.

(Additional reporting by Drazen Jogic and Richard Lough; Writing by Richard Lough; Editing by Edmund Blair and Mark Heinrich)