Pirates in Haradheere, however, said Hizbul Islam, which has vowed to topple the UN-backed government, sent agents to the coastal town to demand a portion of their business a few days ago, but the pirates refused.
"They came into the town, they want to have their own pirates in here and oust us," Hassan, a pirate who was fleeing the town, told Reuters.
"Some of their agents came to us two days ago and asked us to work with them and pay. We rejected this and they entered today," he said.
'No clashes recorded'
Al Jazeera's Jama Nour, reporting from Mogadishu, confirmed that Haradheere had been under the control of Hizbul Islam since the morning.
"No clashes have been recorded in the city yet," he said.
"Senior officials of the group told us they will build a local government in the city to stabilise their presence there."
Haradheere is one of the main bases for Somali pirates, who are believed to be holding at least three hijacked vessels in the town's port at the moment, Andrew Mwangura, the co-ordinator of the East African Seafarers' Assistance Programme, said.
Fighters with the Islamic Courts Union, a movement that briefly ruled Mogadishu in 2006 before being ousted by Ethiopian soldiers, clamped down on Somali piracy as they tried to impose law and order.
"But I'm afraid this time around it might put the lives of the hostages in danger," Mwangura said.
Some residents said they feared Haradheere would now become a battleground if Ahlu Sunna Waljamaca, a pro-government Sufi Muslim group, came to fight Hizbul Islam.
Hizbul Islam and al-Shabab, another armed group opposed to the government, have been fighting to topple Somalia's Western-backed government since the start of 2007.
More than 21,000 civilians have been killed since the start of the violence.