Keydmedia Online is under expansion!
The women were arrested in Buale, about 300km (185 miles) south-west of the capital, Mogadishu. BBC Somali analyst Mohamed Mohamed says it is rare for al-Shabab to carry out such mass arrests.
The al-Qaeda-linked group controls much of southern and central parts of Somalia. The women were arrested in the market, taken away and warned before being released.
Because it was their first offence, they were not punished but they could be whipped in public if caught again. Our analyst says the temperature can reach 35C (95F) at this time of year and so many women preferred to wear lighter, traditional clothes than those approved by al-Shabab.
The women were told to wear a niqab, which covers all of their body and face, leaving just a small slit for their eyes. Al-Shabab, whose name means "The Youth" in Arabic, advocates the strict Saudi-inspired Wahhabi version of Islam.
They have stoned to death people accused of committing adultery and amputated the hands of thieves. A UN-backed government, aided by African Union forces, has pushed al-Shabab out of the country