When an estimated 3,500 Muslim athletes come to the London Olympics this summer, the pinnacle of their athletic careers will directly coincide with one of the most important periods in their spiritual calendar. This year, all 17 days of athletic competition take place during the holy month of Ramadan, when Muslims are required to fast and refrain from drinking water from sunrise to sunset. The overlap of Ramadan and the Olympics may prove a physical and spiritual challenge to many of the observant athletes–but in many ways the Olympic spirit and the holy month share a core essence that makes the overlap somehow appropriate and harmonious: sacrificing the self and practicing self-control in the bid to achieve perfection.

At its core, Islam is a very practical and flexible religion, one that has historically accommodated difficult circumstances. Many Muslim athletes at the Games this year will avail themselves of that flexibility, others, particularly observant women, have found ways to compete while adhering to traditional interpretations of Islamic law that require them to cover their bodies. Top ranked U.S. sabre fencer Ibtihaj Muhammad will be the first American woman to compete in hijab, following in the footsteps of Bahrain’s Ruqaya Al Ghasara a sprinter who, in 2004, was the first athlete to compete in a specially designed athletic head-to-toe covering. This year Afghanistan’s boxer Sadaf Rahimi will do the same, even as she defies tribal custom—and the Taliban’s strict interpretation of Islamic law that prohibits blows to the face—by boxing in a room full of men.

Like many Muslim athletes, both Muhammad and Rahimi will have to answer the religiously fraught question of whether or not they will fast during competition: whether spirituality takes precedence over physical prowess and the tantalizing chance to win a medal for their respective nations. What was once a private affair between an adherent and her God has become a public litmus test of faith. Rahimi has said she will not fast while she is in London, citing an historic exemption for travelers. Ghulam Naseri, an Islamic scholar from her hometown of Kabul, says that the Koran makes allowances for travelers “more than a camel ride away from home.” She will make up those missed days of fasting when she is back in Afghanistan and no longer worried about being at her physical peak.

British rower Moe Sbihi won’t need that option. He consulted with religious leaders (and a Moroccan goalkeeper for Real Mallorca who never fasted during his time playing for Spain’s La Liga), to come up with his own solution: he will donate 1,800 meals to the poor, 60 meals per day of not fasting, to fulfill his spiritual obligations.

To Fawaz A. Gerges, Director of the Middle East Centre at the London School of Economics, the varying approaches to the Ramadan fast are a demonstration of Islam’s inherent dynamism. “The element of practicality and flexibility is really fundamental to how Islamic scholars deal with difficult situations. The Olympics are no different – what we are seeing here is the rule, not the exception,” he says, pointing out that out that most Muslim athletes have said in interviews that they will not fast while in London. “They are finding ways and means to compensate, whether it’s doing charity work, feeding the poor, or postponing their fasts.”

Not only will this year will mark the highest participation of Muslim athletes, it will also be the first year that every single country is represented by both male and female athletes. For the first time Qatar and Brunei will be sending women. Even Saudi Arabia, after a long debate, has reluctantly agreed to send two women— Sarah Attar in the 800 meters and Wodjan Ali Seraj Abdulrahim Shahrkhani in judo. It’s an historic achievement for both the Olympics, and for Muslim women across the world. What better timing than for this to happen during Ramadan?

Aryn Baker is the Middle East Bureau Chief for TIME, covering politics, society, culture, religion, the arts and the military in the greater Middle East, including Pakistan and Afghanistan. She currently resides in Beirut, Lebanon.