A massive blaze has destroyed the central market in the northern Somali city of Hargeisa, wiping out hundreds of small businesses, officials said on Saturday.

Fierce flames tore through the Waheen market late on Friday, sending huge clouds of smoke billowing into the night sky over Hargeisa, the capital of the breakaway region of Somaliland.

The cause of the inferno that engulfed the sprawling market – the economic lifeblood of the city and home to an estimated 2,000 shops and stalls – is not yet known.

Officials have issued urgent appeals for help to recover from the disaster that injured more than two dozen people and is certain to inflict further hardship on thousands more in the impoverished desert city.

"The town has never witnessed such a massive calamity," Hargeisa's mayor Abdikarim Ahmed Moge told reporters at the scene.

The fire broke out on Friday evening and firefighters battled the flames for hours before it was largely brought under control on Saturday.

"This place was the economic centre of Hargeisa and even though the firefighters did their best to contain the fire, the market is destroyed," the mayor said.

He added that the blaze could have been brought under control before causing such extensive damage but firefighters' efforts were hampered by problems of access.

The vast market is a crowded warren of shops and makeshift stalls, with no proper streets, only narrow pathways.

Images of the aftermath in and around Waheen showed charred and blackened buildings, some still smouldering, with their windows blown out.

The leaders of several countries including Britain, which once ruled Somaliland, and neighbouring Ethiopia, voiced their shock and sympathy over the disaster.

Somalia's President Mohamed Abdullahi Mohamed, better known by his nickname Farmajo, also telephoned Somaliland president Muse Bihi Abdi to discuss the damage wrought by the fire, his office said on Twitter.

Abdi meanwhile said during a visit to Waheen that about 28 people, nine of them women, were injured, but that so far no loss of life had been reported.

He said the government of Somaliland – which declared independence from Somalia three decades ago – would be releasing one million dollars to help with the emergency response to the blaze.

Hargeisa Chamber of Commerce chairman Jamal Aideed said the loss of the market was immense as it accounted for 40 to 50 percent of the city's economy.

"I have lost everything tonight, this fire was the biggest I have ever seen in my life," said market trader Bashi Ali.

"I had several businesses in the market and all of them burned to ashes."

Hargeisa councillor Abdirahman Abdi appealed for people everywhere to come to the aid of the devastated city.

"I want to ask everyone who hears of this disaster to help: fire brigades, national armies, media and the people of Hargeisa."

British government ministers including Prime Minister Boris Johnson voiced their sympathy over the disaster in Somaliland, an area that was once a British protectorate.

"We are in close contact with the Somaliland authorities, our international partners and aid agencies operating in-country, and are considering what assistance is needed," Britain's Minister for Africa Vicky Ford said on Twitter.

Ethiopian Prime Minister Abiy Ahmed said he was "shocked and saddened" by the blaze that he said had caused "incalculable losses".

The International Organization for Migration (IOM) in Somalia said the blaze had affected thousands of people including migrant workers, and pledged to work with the authorities to help people recover.

Hargeisa, a trading and watering hub, is also a transit point along a people-smuggling route through the Horn of Africa and many migrants wind up stranded there.

Somaliland declared independence from Somalia in 1991, an act still unrecognised by the international community that has left the region of 4.5 million people poor and isolated.

Somaliland has however remained a comparative beacon of stability while Somalia has been wracked by decades of political violence.