After traveling by car, boat and helicopter, the family lost track of the days. Their smuggler told them to keep quiet. Most of the time the family didn't know the name of the town it was in, let alone which country, they said.
After spending nearly 24 hours in the mountainous region near the border of the U.S. and Mexico west of Ocotillo, Waheeda went into labor one month sooner than expected.
In the dark isolation of the mountains late Friday night, the family continued using the glow of distant city lights to guide them.
As Waheeda's pain grew stronger, the family lost sight of their smuggler and instead focused on their mother and wife, they said.
It became apparent Waheeda needed medical attention even if it meant being picked up by local authorities.
No longer trying to hide, one of the daughters went to look for help, nearly getting lost in the dark. Using their voices as guides, the two sisters called out to each other in the night to bring the one back to the group.
The sounds and lights of passing cars indicated they were near a road and the family called for help.
Four U.S. Border Patrol agents patrolling the area near Interstate 8 and Palm Canyon heard the cries in an unfamiliar language around 1 a.m. Saturday.
"Her water had already broken. She was on the ground," said Border Patrol Agent Luis Marquez of the scene he and the other agents found.
Though Waheeda was close to the highway, the embankment up to the road was steep and rocky, nearly impossible for her to climb in her condition.
After requesting emergency medical assistance over their radio, the agents used hand gestures to communicate with the family.
With the help of Nadia Arredondo, a law enforcement communications assistant, on the other end of the radio, the agents were able to deliver the baby just minutes after finding the family.
Following Arredondo's instructions to wipe down the baby and keep her warm, Marquez and the other agents noticed she wasn't breathing and was turning a bluish color.
"We started manual stimulation of her chest and stomach," Marquez said, although the efforts didn't seem to be working.
The other agents continued to relay medical instructions from Arredondo back to Marquez when suddenly the baby coughed up some liquid and popped open her eyes, Marquez said.
"During the whole time, (Arredondo) did a really good job," Agent Richard Ramirez said.
Though the agents, including Darren Wahmhoff and a fourth agent whose name was not available, had seen live births, they'd never delivered a baby before Saturday.
"I think the guys handled the situation pretty great," Arredondo said, adding she didn't hear any stress in their voices.
In a situation where communication was entirely non-verbal, Marquez said it was important to stay calm despite the pumping adrenaline.
"We didn't want to scare them," Marquez said.
"If anything, this job (with the Border Patrol) taught us to handle this," Ramirez said of his regularly stressful job.
Waheeda was transported to El Centro Regional Medical Center, where she was treated and discharged early this week. The baby, named Monica because it's an American name, was released from El Centro Regional on Wednesday.
Their journey, however, isn't over.
Just because Monica was born in the U.S. and is therefore an American citizen, there is no guarantee the rest of the family will be allowed to stay.
The Shahs were taken Wednesday to a Catholic Charities-run shelter in San Diego from which they'll begin the legal process of attaining political asylum.
Spinal complications will require more medical attention for Monica.
The Shahs, who don't have any family members in the country, won't be alone. They met with representatives from the Afghan Women's Organization of San Diego and the International Rescue Committee on Wednesday.
Though the Shahs had no idea what to expect from their journey to the U.S. (they didn't even know what part of the country they'd crossed into), they said they're extremely grateful to the Border Patrol agents for helping them.
Said Arredondo: "That's what we're there for. I think a lot of people don't realize we're there to help."
Staff Writer Kelly Grant can be reached at 337-3441.