After serving nine months in prison for stealing, Jacqueline McDougall's future was on the line. A parole board would decide whether she would be locked up for an additional three years.
But her fate was not the only one hanging in the balance. If denied parole, McDougall's young son Max, who grew up behind bars with her, would be sent home if he became too old.
"Nightline" spent a year following McDougall and Max at Bedford Hills Correctional Facility for Women in Bedford Hills, N.Y. They are part of the small, but growing number of inmates raising their babies behind bars.
The vast majority of the 2000 or so inmates who give birth in American prisons are separated from their babies shortly after birth. Bedford is one of the handful of women's prisons that allow some incarcerated moms to keep their newborns with them, in some cases until the babies are 18 months old.
"I think seeing his little face every day and know that…I have to take care of him is going to be a big incentive for me. Definitely," McDougall, 26, told "Nightline."
No one convicted of violent crimes, arson or crimes involving children are allowed into Bedford's program. McDougall landed herself in prison after she got caught stealing silverware. She said she needed the money to buy drugs, including prescription pills and cocaine. By the time she was sent to prison, McDougall said she was clean, but also pregnant.
"My water broke here then I went out to the hospital. I was in labor for 48 [hours] with Max," McDougall said.
Though inmates accepted into Bedford's program live in a separate wing apart from the general population, it is still a prison. Inmates are not allowed to have cell phones, jewelry, or wear makeup, and they can only have three photos a month of their baby.
McDougall's prison cell was the only home Max had ever known since his birth. "We don't have a lot of space," McDougall said of her cell. "It's hard."
However, giving birth to Max in prison, she said, was a blessing in disguise.
"I've had time to clean up my act and really see where I was headed," McDougall said. "It wasn't in a good direction. I think at the end of it all now. I kind of think this saved my life."
Dr. Janet Stockheim, a pediatrician who comes every two weeks to check up on the babies in the prison, including Max, said it can benefit a baby to be raised behind bars.
"The babies aren't aware. They get excellent care," Stockheim said. "They are very well bonded to the mothers… Bonding gives a baby trust in the world that they will be taken care of. The babies do better here than they would on the outside with some of these mothers."
Max and his mother have never spent a full day apart. Aside from her chores in the prison block, McDougall is a full-time single parent, bathing, diapering, and nursing, which heightens bonding for both mother and baby. The mothers also get parenting classes.
"As much as I hate being here, this has really helped me, being a mother. The motivation to get up every day," McDougall said.
While the mothers and their babies receive a lot of care at the prison, Liz Hamilton, who runs the nursery program at Bedford, said the mothers are still inmates.
"It is punishment. Of course you see the warm, fuzzy, the baby care, but you don't see the waking up early, getting all the chores done," Hamilton told "Nightline." "They don't have their freedom, and they don't get to make all the choices they would make outside."
The cost for each baby is roughly $24,000 per year, but it's cheaper than the $30,000 per year that it costs if a mom, who didn't receive any support, ends up back in jail.
"If that woman stays out of jail for five years, think of [those] savings," Hamilton said. "It's keeping that child from the foster care system. That's another expensive program."
One study showed that 33 percent of moms who'd been separated from their babies wound up back in prison, compared to the under 10 percent of moms who were able to keep their babies and didn't return to prison.
At her parole board hearing, McDougall was able to secure an early release date and keep Max with her until then. But it doesn't always work out that way.
Joyce Browning was also an inmate at Bedford and gave birth to twins on the same day McDougall had Max. Browning wanted to raise the twins herself.
"It's just a feeling that you get when you are away from your kids," Browning told "Nightline."
Yet, when the twins were 4-months-old, Browning said she got into an argument with a prison guard on Christmas Eve, and her babies were sent home.
"Everything happened fast. They just came to my room...told me I had to pack up," Browning recalled. "It was very, very upsetting, very stressful. I would cry in my room."
Although Browning was lucky to have the babies' father step up, she said she spent every day in prison worrying about them.
"What are they doing? What's going on? Where are they? Who are they with now? Even though they were with family, it's just still that thought that runs through your mind. Are they safe?" Browning said.
Unlike Browning, McDougall and her son remained together until their day of freedom, on June 10, 2013. While McDougall eagerly awaited her release, she said she was nervous about finally being by herself with Max.
"Because here we don't have the choice really to do wrong. And out there, I have all the choices in the world. What do I want to eat today? Do I want to get high?" McDougall said.
Three months after walking out of Bedford, McDougall is staying at parents' home and has landed her first job. For the first time ever, she said, she is planning and saving for her future with Max in the equation.
"It was very hard the first month I think to really get a grasp on being sober and being home and what real life is going to be with me now with a child." McDougall said.
"I just hope one day he can learn from my mistakes and not go down the road that I chose. I really just want him to be able to make better decisions than I did."
Tune into the full story on ABC News' "Nightline" TONIGHT at 12:35 a.m. ET