BALTIMORE — After a month of painful withdrawal that bunched her body into a tight ball, after tremors and diarrhea and sleeplessness and difficulty eating, Makenzee Kennedy went home to her bed in a drug rehab facility to celebrate a milestone: turning 2 months old.

She lives there for now with her mother, 31-year-old Ashley Kennedy, who is 11 years into her on-again, off-again struggle with heroin addiction. If all goes well, Makenzee will never again see the inside of Mount Washington Pediatric Hospital, where she was weaned off drugs through intensive, round-the-clock care.

“It’s not my first time trying to stop,” Ashley Kennedy acknowledged as she bottle-fed Makenzee. “It’s my last time now. I don’t want to touch another drug after putting my baby through this.”

In communities across the nation, the collateral damage of the heroin epidemic is rippling through the health-care system. The rate of hepatitis C is skyrocketing, fueled by needle sharing among addicts. Experts worry that an upturn in HIV rates may not be far behind. And the rate of fatal heroin overdoses has quadrupled over the past 10 years. In Baltimore, nearly two-thirds of the 302 overdose deaths last year were caused by heroin.

“We have a very serious issue in the U.S. right now in terms of the use of heroin and other opiate agents,” said Alan Spitzer, senior vice president at Mednax, which provides maternal and newborn medical services to hospitals.

Among the most heartbreaking developments: a sharp rise in the number of drug-exposed newborns like Makenzee. The incidence of “neonatal abstinence syndrome” has quadrupled over nine years, to 2.7 percent of all neonatal intensive care (NICU) admissions, according to a study published in May by Spitzer and others.

The cost to care for each child has also soared, to an average of $53,000 in 2009, according to other research.

With a bag of heroin now cheaper than a pack cigarettes, people once addicted to costly prescription opioids are turning to the cheaper street drug in alarming numbers, according to the Centers for Disease Control and Prevention. As a result, heroin has invaded suburban and rural America, places such as Elkton, a small town of 15,000 in northern Maryland where Ashley Kennedy grew up.

At 17, Kennedy suffered facial injuries in a car accident and was prescribed Percocet for pain. The pills were easy to obtain after her injuries healed, and she became hooked.

At 20, she began selling heroin. “But then I wanted to know what was the big fuss about this whole thing that I was selling. So it just took one bag and there it went,” she said.

Ashley Kennedy, left, talks with nurse Megan Kelly as she cuddles her infant daughter, Makenzee. (Bill O'Leary/The Washington Post)

“It was just a good high. Better than Percocets.”

Over the next decade, she gave birth to a disabled son, lived in a car and was jailed five times for theft, credit-card fraud and other crimes she said she committed for drug money. Released from jail last September, she was using heroin again by the end of the month. In October, she discovered she was pregnant with Makenzee.

But Kennedy kept using, eventually injecting 30 five-dollar bags of heroin a day. When she wasn’t shooting heroin, she was out searching for it.

“Stay high all day. Wake up and do the whole process over again because I wouldn’t have nothing left in the morning,” she said.

She found a doctor who prescribed Subutex, a medication designed to replace the craving for heroin, but it didn’t work. Kennedy wound up taking both drugs, or traded her Subutex for heroin on the street. Then she turned to methadone, which didn’t fully satisfy her cravings either.

In March, a judge threatened to take her children away. Kennedy finally quit using heroin and was admitted to a residential rehab program. She finished her pregnancy on methadone; giving up drugs entirely could have killed her unborn child.

As extensive as it was, Kennedy’s drug history is relatively uncomplicated, compared with the habits of most pregnant drug users treated at the Center for Addiction and Pregnancy, an intensive outpatient program at Johns Hopkins, not far from the hospital where Makenzee Kennedy went through withdrawal.

More than three-quarters of the women in the program have some form of mental illness; many take medication for depression, anxiety, schizophrenia, bipolar disorder or post-traumatic stress syndrome, said Lauren Jansson, the center’s director of pediatrics.

Most have hepatitis C. Opiates are now the favored drug for about 75 percent of the women, Jansson said, but they are often mixed with cocaine, marijuana and alcohol. Virtually every woman smokes throughout her pregnancy.

Like Kennedy, some women seek help when they realize they’re pregnant. Others deny taking drugs until after their child is born and begins suffering from tremors or other symptoms of withdrawal, said Monique Satpute, director of the Center for Neonatal Transitional Care at Mount Washington, where Makenzee was treated.

“We have to go back and say, ‘Is there something you didn’t tell us?’ ” Satpute said.

Doctors used to think a baby’s withdrawal was related to the quantity of heroin a mother used or the number of months the child was exposed in utero. But studies have found that not to be true, Jansson said. Some newborns experience only mild symptoms. Researchers are searching for a genetic link to withdrawal.

Caregivers today assume that no two children will go through withdrawal in quite the same way. That makes the process tricky and labor-intensive. Each newborn must be weaned slowly and monitored carefully around the clock, with one paramount goal: avoiding a devastating seizure that could have lifelong consequences.

Although doctors and nurses have become adept at that, the sad truth is they can’t do much to lessen the misery of a baby in withdrawal. Makenzee, for example, arrived from the University of Maryland Medical Center already started on tiny amounts of morphine and clonidine, a blood-pressure medication that helps in the weaning process.

Every three hours, she was assigned a “Finnegan score” based on 21 factors observed by nurses, including tremors, hyperactivity, fever, difficulty sleeping, sweating and her ability to suck, which often is compromised in infants going through withdrawal. Those scores are averaged and used to determine the next day’s dose of morphine.

Makenzee was a difficult case: Healthy newborns sleep most of the day; she was awake all the time. Healthy newborns relax and begin to stretch their limbs; Makenzee clenched her arms and legs tightly and cried constantly as she adjusted to minuscule reductions in the opiates she had been receiving in the womb. She had acidic diarrhea and sweated heavily.

Nurses dimmed the lights in her room, played soft music and spoke in low voices. They swaddled and held her. They changed her diaper often and patiently fed her.

“It hurts,” said Kay Mathias, the nurse practitioner who runs the unit where Makenzee was treated. “If you [go through] withdrawal, it hurts.”

Of the 97 drug-dependent infants Mount Washington has discharged over the past year, most were ready to go home after about two weeks. Makenzee’s withdrawal took 31 days and cost Medicaid $32,777.

Research has not found devastating long-term consequences for newborns who go through withdrawal. Such children tend to fare poorly by most health and socioeconomic measures, but it’s not clear whether that’s the result of the drugs in their systems at birth or their subsequent upbringing in often terrible homes by parents prone to drug use.

“We don’t think that they have any neurodevelopmental delays just from going through withdrawal,” said Leslie Kerzner, associate medical director of the Special Care Nursery at Massachusetts General Hospital in Boston, who tracks such children for years after birth. “In most kids, the brain is very plastic and they kind of rewire.”

At the rehab facility, Ashley Kennedy prepared for her baby’s release from the hospital by taking herself off methadone. After rehab, she plans to return to her mother’s house in Elkton, where she hopes to raise her children far from her drug-seeking friends.

For nine days, she went cold turkey, a brutal experience she hoped would leave her sufficiently clear-headed for the more difficult journey ahead.

“So we went through it together this last week,” Kennedy said. “It was painful. [Your] body’s aching. Your bones hurt. You can’t stay still. You can’t sleep. You can’t eat. You’re having diarrhea. . . . My body still hurts. My back still hurts. My legs sometimes. My knees.

“But it’s worth it. Thoroughly worth getting off everything to be with my child.”