(CNN) -- It's just a few minutes after the final whistle has blown and the shiny basketball court of the Al Gharafa Sports Hall in Doha is filled with shouts and cheers.
The sky blue-clad national women's basketball team from war-ravaged Somalia has just beaten Qatar, the host nation, at the 2011 Arab Games, in a hotly-contested match that ended 67-57 to the East African country.
"Words can't describe how I felt," says Canadian-born Somali team member Khatra Mahdi about last week's triumph. "We were all jumping up and down, there were tears in the girls' eyes -- history was made right there," she adds.
The victory marked a remarkable feat for the Somali players as it came against a backdrop fraught with difficulties and danger.
Notwithstanding Somalia's prolonged civil war and shattered sports infrastructure, the team says it had to prepare for the Games in the bullet-ridden police headquarters in Somalia's capital, Mogadishu. There, the women would train for two to three hours a day under the watchful eye of security officers, tasked to safeguard them against religious militants targeting women playing the sport.
"We try to protect them outside and inside," says Said Duale, the secretary general of the Somali Basketball Federation, adding that the safety of the women is "taken very seriously."
In recent years, many Somali athletes have been threatened by members of the militant Islamist group Al Shabaab who see sport as an "un-Islamic" activity, according to Duran Ahmed Farah, the Somali National Olympic Committee (NOC) senior vice president for international relations.
In summer 2006, the Islamic Courts Union (ICU), which then controlled Mogadishu, labelled sport as a "satanic act" and issued an order prohibiting women from playing sport, including basketball.
A few months later, the ICU was deposed but Al Shabaab, which has connections to al Qaeda, is still fighting to impose its own interpretation of Islamic law, or Sharia, on the country.
"The threat is always there -- there are people who will see girls playing sport as a devil's thing and they will not allow it," Farah says.
Women have been stoned to death for adultery; amputations and beheadings are common while in some areas Al Shabaab has banned listening to the radio.
"These girls are brave: in that kind of environment they're still playing their sport, the sport they like," says Farah.
Basketball is one of the most popular sports amongst women in Somalia. Duale says that the country's first national female basketball team was created in the early 1970s but hadn't performed at an international tournament since 1987.
The Islamist ban, coupled with the challenges presented by the lack of sponsorship and destroyed facilities, have all hindered the development of the sport in recent years.
Yet, despite the threats and all the setbacks, Somalia's national women's basketball team concluded its participation at the Games on Monday with the very respectable tally of three losses and two victories -- Kuwait also lost to Somalia.
Like some other teams representing Muslim countries, the national team plays in relatively modest uniforms: track pants and shirts with elbow-length sleeves; players also wear scarves that cover their hair.
Coach Mohamed Sheekh put together an ambitious team comprised of women based in Somalia and the diaspora -- the United States, Canada, UK and Germany. Many of the players hadn't even seen their teammates before, let alone played a basketball game with them.
"I'm very happy and proud of them," says Sheekh of his players. "They were excellent and everyone was talking about them."
NOC president Aden Hagi Yeberow says the team's success in Doha can act as a unifying factor in a country that's been plagued by insecurity, political instability, lack of unity and scarcity of resources.
"We want to use sport as a peace-building tool to bring the Somali people together," he says. "What these young girls are doing in this tournament has laid the foundations, hopefully, of a good future of our people.
"We would like to capitalize on this and also to move forward and, hopefully, this will be the beginning and the start of the unity of our people."