Edna Adan, a former foreign minister in Somaliland and a pioneer activist in the struggle to end female genital mutilation, sees this as an important sign.

A former runner herself, the 82-year-old Ms. Adan, founder of a respected maternity hospital, said it was important to remind Somali female runners that what mattered was “the training they did, the preparation they made and the ability that they could keep up with women of different countries.”

The race is about reminding young girls that their gender or nationality isn’t “a handicap” to their own success, Ms. Adan said.

At this year’s 10-kilometer race, it seemed as if the women found support in each other.

The competition began at 7:30 a.m. in the Hargeisa Stadium. The women jostled against one another, running on the grass carpet of the arena before hitting the labyrinthine streets and alleys of the city, where tea shops and kiosks were just opening up.

Throughout the relatively flat route, they ran in pairs, sometimes pulling each other by the hand, and encouraging one another to keep going even after some gave up and started walking a few kilometers in.

Women in Hargeisa who are interested in sports are finding other outlets besides the marathon. One is the Lions Women’s Football Initiative — an informal soccer league that also offers training for women in self-defense and running, along with workout and nutrition guidance.

Just a few months after it started in 2016, dozens of young women came to train and run at a private pitch rented by its founders, Asma Saed and Savannah Simons, who both work for the marathon.