The blast by a car bomb parked near a restaurant went off at a busy time when shoppers and traders were gathered inside the market, said district commissioner Ahmed Abdulle.
The powerful blast was the first major attack since Somalia's new president was elected on February 8.
"Someone had parked the car here and left before it was detonated," said Mohamed Haji, a butcher who suffered shrapnel wounds, pointing his finger at a clothes shop devastated by the blast. Pieces of wood and metal sheets on the ground were all that remained of the shop.
"It's a painful carnage." said Ali Mire, a government soldier who was helping a friend with multiple shrapnel wounds.
The blast occurred a few hours after Somalia's Islamic extremist rebels, al-Shabab, denounced the newly elected President Mohamed Abdullahi Mohamed as an "apostate" and vowed to continue fighting against his government.