“I realize God is an important part of my life and I utilize religion in every aspect, keeping God close to my heart,” says Bill Hamid. (Patrick McDermott/GETTY IMAGES)

D.C. United goalkeeper Bill Hamid is balancing physical and spiritual needs.

During the searing summer, his body tells him to remain nourished and hydrated. As a Muslim, his heart instructs him to observe Ramadan, the month-long period when food and water are forsaken between sunrise and sunset.

It’s a dilemma for an athlete. In Islam, there is room for compromise.

On days off or when a light workout awaits, Hamid says he fasts. But before strenuous workouts, and in the days leading to a match and on game days, he will follow a normal routine of consumption.

It has been a new experience for Hamid, 21, who was raised amid Muslim traditions at the family home in Annandale but had never fasted until this year. Ramadan began July 20 and will end Aug. 19.

“As I get older, I get stronger into my faith and my family’s faith and staying true to it,” said Hamid, United’s first-choice keeper for two years. “I realize God is an important part of my life and I utilize religion in every aspect, keeping God close to my heart.”

United officials weren’t aware of Hamid’s decision to fast until this week but met with him to ensure proper health.

The medical staff has “no concerns,” head athletic trainer Brian Goodstein said. “We came up with a diet plan that coincides with his beliefs in ways that he can eat properly and still have energy for his events.”

On days he does fast, Hamid sets his alarm for about 4:15 a.m. to provide enough time to eat and pray before sunrise, which comes a little after 6 a.m. United practices for 60 to 90 minutes in the mid- to late-morning four or five days a week. He kills a few hours in the afternoon with a nap, then feasts when the sun goes down around 8:20 p.m.

Ramadan falls in the ninth month of the Islamic calendar, which doesn’t align with the western calendar. So the observance period is at a slightly different time each year.

Because of the physical demands, particularly in the dead of summer this year, “I advised him not to fast,” said his father, Sully, who operates Premier Athletics Club, a youth soccer program in Northern Virginia. “I’m coaching on the field all day and I almost pass out. It’s hard for a player, but he wanted to do it.”

Hamid’s parents were raised in Muslim homes in Sierra Leone in west Africa. His mother, Fatou, came from a strict family. Bill’s given first name is Abdul. Sully, who arrived in the United State in 1988, said he has fasted every year since he was 10. Children generally do not fast, and when Bill reached the age to begin daily observance, he was too invested in soccer to give up food and water for a month.

“We tried it once when he was 10,” his father said. “Every second, he asked me, ‘What time is it?’”

This year, drawn closer to his faith, Hamid decided to begin fasting.

Islam allows followers to delay fasting until later in the year. Among those granted flexibility are pregnant women, frequent travelers and people with jobs impacted by the absence of food and water. Hamid said he would compensate for missed days after the season ends.

Muslims may also provide food or money for someone in need, such as an elderly relative, in order to fulfill a daily requirement.

Ramadan brings families closer. Hamid’s refrigerator in his Alexandria home is filled with West African meals prepared by his mother and aunt: stews, soups, rice dishes and desserts. The family will also gather for meals more often now than during the rest of the year.

Thousands of Olympic athletes in London are also affected by Ramadan. Some are delaying fasting until after the Summer Games. Others are fasting except on the day of competition.

“Many athletes say they actually play better when they fast, they feel more focused, more in tune with their bodies,” Loughborough University professor Ron Maughan, who has studied fasting’s impact on athletes, told The Independent newspaper in England.

Montreal Impact forward Sanna Nyassi, a native of Gambia in his fourth MLS season, has fasted on days off. Hamid has it a little easier: Goalkeepers don’t require as many calories as field players to maintain endurance.

“I feel good,” Hamid said. “I am keeping my body in the right place, taking supplements, the things I need for training. I am trying to keep myself as healthy as possible.”