When Amanda Ashley quit heroin, she was three months pregnant, alone and working as an escort out of a motel in Hagerstown.

“I can honestly say that I didn’t want kids,” she said. “I was probably doing about $150 of heroin a day. And $50 of coke. I was shooting ketamine, smoking crack. I just didn’t care.”

Ashley, 28, had struggled with drug addiction since she was 18 years old, but she described the period before her pregnancy as one of her most stable in years. She and her then-boyfriend were renting an apartment together near Hagerstown and she worked as a waitress at the Tilted Kilt, which supported a moderate, $20-a-day heroin habit. For a woman once “so addicted to the needle” that she injected whiskey into her veins, Ashley said her life then seemed normal, sustainable even.

“I was barely using at that point,” she said. “This was the most functional I had ever been in my entire drug history. I was going to work sometimes 14 hours a day, serving, coming back and buying some drugs, then we would go to bed and I would do it all again the next day. But I just felt like I didn’t have a problem with it anymore.”

Toward the end of 2015, Ashley said, she began experiencing the classic symptoms of pregnancy. Her breasts grew, and she felt queasy and fatigued at work. She missed a menstrual cycle. When a pregnancy test confirmed her sinking suspicion, she was suddenly confronted with an unwelcome and unexpected problem.

“I didn’t know what to do, because I was addicted to drugs,” Ashley said. “I’d had three abortions prior to this. I didn’t want kids. This was not something I ever pictured.”

Today, Ashley and her infant daughter, Alice, live in a town house near Urbana with large front windows and a white fence around the backyard. Alice is 8 months old, with a shock of dark hair, and she bounced happily in a baby seat as Ashley discussed her past as an addict.

“When I think about it, like how I would even obtain drugs anymore, it just seems like such a far-out idea,” she said, her large blue eyes widening with incredulity. “Which is crazy to me, because that was my everyday life. Now, I couldn’t even picture doing that. You know, ‘Oh, let me go shoot up in the bathroom, my baby’s in her bassinet, sleeping.’ Like, that’s crazy to me.”

Soon after the positive pregnancy test, Ashley said, she was suddenly faced with a cascade of other difficulties. She was fired from the Tilted Kilt and subsequently lost her apartment. In January, her boyfriend was arrested on two outstanding warrants and taken to jail. During the blizzard of 2016, she found herself alone in a room at the State Line Inn in Hagerstown, eating snow after the building lost access to running water.

By then, Ashley was about three months pregnant, and she stayed at the motel for another month. At that point, she said, she was “going hard” — spending more than a hundred dollars a day on heroin and escorting to pay her bills. The situation got so bad that her boyfriend called her from jail and begged her to stop.

“He’s like, ‘Babe, you’re killing me, you’re killing the baby and you’re killing yourself. You gotta go do something. So, I sat there, and I had my shot in my hand, and my prenatals on the bed,” Ashley said, referring to vitamins. “And I ate my prenatals while I’m on the phone with him, and I start sobbing, because I was, like, ‘What the f- — am I doing?’

That day, she called a client — whose own daughter had died of a heroin overdose, she said — and asked him to take her to the hospital. She had her first sonogram, and found out she was pregnant with a girl. It was at that moment — seeing Alice, then just a smudge on the screen — that she decided to get clean, for good.

“I just cried and cried and cried,” Ashley said. “I was, like, how am I going to do this? ... How am I going to have this baby girl?”

The challenge of detoxing from heroin while pregnant, coupled with Ashley’s immediate need to find stable housing, shaped the first few months of her pregnancy. After spending two weeks at Johns Hopkins Bayview Medical Center in Baltimore and two at the Shoemaker Center — a treatment program in Sykesville — Ashley was referred to Avery House, a halfway home in Rockville for women and children. While in rehab, she started taking Subutex — a semisynthetic opioid, similar to methadone, that is used to treat and manage addiction.

Doctors had warned Ashley, before giving birth, about what she might face once Alice was born. When infants are exposed to opiates in the womb, they have a high chance of developing neonatal abstinence syndrome, or NAS — the technical term for withdrawal symptoms in babies. At their most severe, symptoms can include tremors, diarrhea, vomiting and myoclonic jerks, or sudden twitches in the baby’s limbs.

Alice, born Aug. 9, 2016, at Frederick Memorial Hospital, came out withdrawing from Subutex. Ashley said her symptoms were classic — tremors, rapid breathing and, most disconcertingly, a tendency to emit shrill, “glass-shattering” cries as if to give voice to her discomfort. The baby spent five weeks in the neonatal intensive care unit at FMH, with Ashley traveling to and from Rockville nearly every day to feed and care for her.

“It was one of the scariest things I’ve ever experienced,” Ashley said. “And knowing that I did that to her, you know? Because I knew firsthand what it was like, how horrible and uncomfortable you are. And if I hadn’t been on the medication, she probably wouldn’t have withdrawn. But the problem with that is that if I had been on heroin, that’s not good either. It was the lesser of two evils.”

From 2011 to 2015 — the most recent year for which figures are available — the rate of neonatal abstinence syndrome in Frederick County went from 11.3 cases per 1,000 births to 18.4, an increase of nearly 63 percent. In neighboring Washington County, the rate was significantly higher. It rose 22 percent, from 35.1 cases per 1,000 births to 42.9.

Ashley’s experience with the condition is also indicative of a larger trend in Maryland, where the number of NAS cases rose from 906 in 2007 to 1,419 in 2015. The increase has doctors and hospitals scrambling to care for the babies — many of whom require intensive care — and develop a more standardized system of care for mothers and NAS newborns.

“There’s a really strong evidence base for what we do, and it starts with the mom and a compassionate tone toward the mom,” said Dr. Jim Rost, a neonatologist at Adventist Healthcare Shady Grove Medical Center in Rockville. Rost is the chairman of a new program called the NAS Collaborative, which was developed by the Maryland Patient Safety Center, a nonprofit group that works to prevent unsafe health care practices and improve care. The collaborative’s aim, ultimately, is to decrease the length of hospital stays for NAS mothers and babies and the number of babies referred to neonatal intensive care units (or NICUs).

Before the collaborative embarks on those goals, however, it’s engaged in what Rost called a “measurement phase” — assessing the attitudes of health care providers toward the addicted mothers they serve. Reducing the stigma around addiction and pregnancy, he said, is key to providing compassionate, standardized care, which can’t be accomplished without some level of understanding of expecting mothers.

“I think it’s really helping staff to understand that we have not walked in the shoes that a lot of our patients have walked in,” said Marianne Hiles, a clinical nurse specialist for Frederick Memorial Hospital. Now an expert in neonatal withdrawal as well as post- and antepartum care, Hiles can still remember when she first noticed a rise in NAS cases while working as a nurse in Indianapolis.

“I remember a woman coming in and sharing with me how she didn’t dye her hair throughout her pregnancy because she didn’t want to harm her baby,” Hiles said. “But she had done heroin through her whole pregnancy. And I remember thinking in my mind that — it just didn’t make any sense to me. How could that be?”

That initial reaction, she said, is common among medical professionals, whose first instinct may be to focus on the discomfort of the babies. Newborns with NAS are fussy, irritable and difficult to console, and can tax nurses whose time is already stretched by other patients.

There can also be a lack of insight into the underlying causes of addiction. According to Hiles and Beth Santa Maria, a social worker for FMH, many women turn to opiates as a coping mechanism after experiencing physical or sexual abuse. Some, through no fault of their own, become dependent on prescribed painkillers, and turn to buying drugs off the street after their prescription expires.

“No one wakes up one day and says, ‘Oh, I’m going to shoot up some heroin,’” Hiles said. “There’s usually a reason why women make that choice.”

At FMH, efforts to provide better treatment for addicted mothers and their babies have started with earlier identification. According to Santa Maria, the hospital staff was recently trained in a new screening tool — called the ‘Five P’s’ — which allows them to assess a woman’s risk of substance use by asking questions about her parents, partner and own personal history.

Though the tool isn’t perfect, attempts to recognize addicted women and get them into treatment can be crucial to the health of their babies. If a mother continues to abuse opiates throughout her pregnancy, it can lead to serious consequences, including miscarriage, stillbirth or placental abruption — a serious condition in which the placenta detaches from the wall of the uterus.

Treatment is also an important way to prevent withdrawal in mothers, which can lead to fetal distress or death, according to the American College of Obstetricians and Gynecologists. Though many women — including Ashley — have hoped to withdraw from opiates entirely during their pregnancies, it’s recommended that addicted mothers stay on a regimen of methadone or buprenorphine, another addiction management medication.

“The majority of babies that we see, that are treated for NAS, are born to mothers who are in a treatment program,” Santa Maria said. That’s important to emphasize, she added, to dispel another stereotype — that women who give birth to babies with NAS are unfit to be mothers.

While hospitals in Maryland are required to notify Child Protective Services if a mother tests positive for illicit substances when she arrives to give birth, most of those referrals do not end in the baby’s removal from the home or a response from the agency.

According to data from the Maryland Department of Human Resources, less than 1 percent of referrals, statewide, over the past three years have resulted in out-of-home placement. And 92 percent of referrals do not result in any CPS action. Most identified mothers are provided with services and parent their children safely in their own homes, said Paula Tolson, a spokeswoman for the department.

At FMH, staff members have recently implemented changes to help mothers care for their babies after they leave the hospital, Hiles said. If substance-exposed infants don’t require care in the NICU, they stay in the room with their parents, where nurses teach the mothers more about NAS and how to comfort their babies.

Substance-exposed infants are also kept at the hospital longer than other babies, in case they begin to experience delayed withdrawal symptoms.

“With suboxone or buprenorphine, or methadone, it takes a while for that to leave the baby’s body,” Hiles said. “So sending them home early really sets up for readmission and pairs a baby that’s really irritable with a mom who might not be functioning to the best of her ability at that point. The goal is improving outcomes, for mothers and children.”

When babies are referred to the NICU, Santa Maria added, the hospital treats them with medicine and palliative care. Infants with severe symptoms are given small doses of morphine, but the hospital also works to reduce stimuli — such as light and noise — that could aggravate their symptoms. Both FMH and Meritus Medical Center near Hagerstown have “cuddler” programs, which allow volunteers to come to the hospitals and comfort babies in the NICU.

At the end of the day, Hiles said, not every NAS case is a success story. Some mothers do relapse, or come to the hospital for second or third pregnancies without conquering their addictions. But the stories that stay with health care workers are the successes — mothers who use their pregnancies as a catalyst for a better life.

“I like to hope that there are more success stories,” she said. “Once they leave our walls, we don’t often know what happens, unless they come back and we learn that they were successful. It’s always going to be a challenge for our moms to find the support they need, and they have to change a lot of their lives. It is hard. But we can only hope.”

As Alice gets older, Ashley said she does worry a bit about what will happen when her daughter becomes more independent. Eventually, Alice will go off to school, and two of the biggest threats to recovering addicts, experts say, are isolation and unstructured time.

“I do worry about that kind of stuff,” Ashley said. “Sometimes I want to have a drink at dinner, sometimes I do want to smoke a joint. It does happen. But again, it’s what’s more important? It’s real easy for them to fall off beds and break their necks, or drown themselves because they’re drinking a bottle that’s propped up and you’ve left the room for a second. I have to be with her and on her 100 percent. All the time.”

Eventually, Ashley said, she might like to find a job in advertising or marketing. But right now, she’s focusing on her daughter, and on building her identity after addiction. She said her pregnancy helped her reconnect with friends she hadn’t spoken to in years, and rekindle her relationship with her father. She’s living with a man who adores both her and Alice. After her and Alice’s stay at FMH, where she learned fundamental parenting skills, she’s more empowered than ever by her motherhood.

“I know I’m a good mom,” Ashley said. “That’s one of the only things I know. I used to call my dad crying, saying, ‘I don’t know if I can be a mom. She would be so much better with a gay couple who had a Mercedes and a nice house.’ You know? I didn’t think I would be able to provide for her at all. But, little did I know, until I became a mom, that it really doesn’t matter how much money you have. It’s how much love you have in your heart.”

Follow Kate Masters on Twitter: @kamamasters.

Kate Masters is the features and food reporter for The Frederick News-Post. She can be reached at kmasters@newspost.com.