Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Babies often come in the middle of the night and it was no different for Clare Shirley.

“The very first contraction woke me up at midnight,” said Shirley, who runs a backcountry outfitters just north of Tofte in rural Minnesota.

But instead of a convenient trip to a nearby hospital, Shirley and her husband Dan embarked on a frightening middle-of-the-night race to the delivery room. That’s because the closest hospital had stopped delivery services a year earlier, and the baby was coming too fast for them to make it to the nearest big city hospital in Duluth.

It’s a problem affecting people across rural America as hospitals struggling to break even shut down expensive and staff-heavy maternity wards.

“It's really a failure of our healthcare system that rural families have to deal with this issue,” said Kristin DeArruda Wharton, a community health nurse at the Sawtooth Mountain Clinic in Grand Marais, where Clare Shirley attended maternity classes.

But one innovative program at the University of Wisconsin School of Medicine and Public Health aims to reverse the trend by training obstetrician/gynecologists in rural areas with the goal of having them practice in the area.

Unfortunately, it’s coming too late to help Clare Shirley.

She and Dan tried to plan ahead, fully aware that their choice to live in the backwoods meant they would likely be unable to just pop over to the maternity ward in an easy 15-minute drive.

Related: U.S. Infant Mortality Still Highest in Developed World

“I'd heard right before I got pregnant, like the month before, that they were going to stop birth services in Grand Marais,” Shirley said.

“My mom was born in that hospital. My grandmother was born at home. My great-grandmother was born up here,” she added. “When I envisioned we'd have our kids up here, I envisioned we'd have our kids in Grand Marais.”

“It's really a failure of our health care system that rural families have to deal with this issue."

Instead, Shirley prepared for a 2 ½ hour drive to the nearest hospital in Duluth. Any parent can attest to that nerve-racking drive to even conveniently located hospitals, but the Shirleys had more than the just time and distance factor to worry about.

“You're worried about deer on the road. You're worried about traffic. You're worried about a rainstorm,” Shirley said.

And what about babies that don’t keep to a schedule? “The plan was at the very first sign of what I thought could potentially be a contraction get in the car and go to Duluth,” Shirley said.

That wasn’t enough. After the midnight contraction woke Shirley, her husband Dan called the doctor in Duluth who had been lined up to deliver the baby.

“She said, ‘OK. Call me when you get closer. I'll meet you at the hospital.” But the contractions immediately started coming faster – unusual for a first baby.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Related: More U.S. Babies Die on Their First Day

“So we knew right from the get-go that we might be in trouble,” Shirley said.

“We headed down the Sawbill trail, which is the road that we live on, and there is no cell service on the trail so we called my mom in Grand Marais and told her to keep our care providers in the loop.”

Saw Bill Canoe Outfitters, a favorite destination for the residents of Grand Marais, MN. Claire Shirley

The gravel road was potholed and dark. “There was nobody else on the road out here,” Shirley said. “There's no cabins, no houses along the way … Normally it's a relaxing drive and it's kind of fun to see the animals -- we see moose, lynx, wolves. But in the middle of the night when you're in labor it becomes more stressful.”

“Women shouldn't have to think twice about getting good quality health care in their small, rural town."

A sheriff’s deputy met them. They had to make a quick decision: head for the maternity ward in Duluth, still more than an hour away, or to the unprepared facility in Grand Marais with no trained OB/GYN and no anesthesiologist on duty.

“At that point it was about 1 in the morning, pitch black, deer all over the road, so we just headed to Grand Marais with the sheriff's deputy trailing us and we met up with the ambulance about 10 miles later,” Shirley said.

Related: Why Does Texas Have Such a High Maternal Mortality Rate?

The story ends happily. Clare and Dan’s daughter Kit was born safely and she’s a healthy 15-month-old now.

“The problem is that once we hit the ambulance, the doctor had to call the doctor in Grand Marais to say ‘We're coming in with a woman in labor. She's going to give birth'. So we weren't able to plan any of this. They had 10 minutes to get ready for us — the 10 minutes we were on the road.”

Women all over the U.S. are making trips like this to give birth – perhaps without the drama of dodging moose and other wildlife on the road, but equally fraught with unpredictability, said Dr. Ellen Hartenbach of the University of Wisconsin.

“It's not uncommon in some of our Midwest and mountain states for people to have to drive 30 minutes, 60 minutes, 90 minutes to the closest place to deliver their infant,” said Hartenbach.

Clare Shirley and her daughter Kit just after Kit was born last year after a fraught run to a nearby rural hospital that had closed its maternity ward a year before. Clare Shirley

Financial pressures, insurance problems, and doctor shortages forced more than 200 hospitals to close maternity wards between 2004 and 2014, according to the University of Minnesota.

In Texas fewer than half of 162 rural hospitals still deliver babies. More than two-thirds of rural counties in Florida, Nevada, and South Dakota have no obstetric services. Sixteen percent of Minnesota’s rural counties lost maternity services in the past decade and one out of every three Wisconsin counties lacks an OB-GYN.

“This is a national crisis. Women's health care and maternity services are central to health care, and we need to do something about it,” Hartenbach said.

Related: Medicaid Cuts Make Access to Healthcare Uncertain in Rural America

Her answer: she’s started the first rural obstetrics and gynecology residency. The program is designed to train doctors in the rural communities they will eventually, Hartenbach hopes, work in.

Claire Shirley and her family love to canoe in Grand Marais, MN, but life in the backwoods means longer travel to the nearest hospital. Claire Shirley

“Women shouldn't have to think twice about getting good quality health care in their small rural town,” said Dr. Laura McDowell, the first resident in the program.

“I think to help with the rural physician crisis, we've got to actually train in those sites so that they can envision themselves practicing in those sites,” Hartenbach said.

“Our goal is to have OB/GYNs practicing throughout the state of Wisconsin and making sure that everybody's getting the right prenatal care and that they're actually able to deliver in hospitals that are closer to their home,” Hartenbach added.

That won’t solve the whole problem, but it should help hospitals that have closed maternity services because they cannot keep professionals on staff.

"We need to pay some attention to what is going on with maternity care in the U.S. This is part of it.”

“One of the difficult things about staffing labor and delivery is if you only deliver you know one baby a day or less than one baby a day, how do you actually pay for all the nursing staff to keep that unit open? So that's kind of part of the challenge,” Hartenbach said.

But the full burden cannot fall on emergency room staff.

“There are unpredictable events that happen with a normal pregnancy. The biggest problem worldwide is hemorrhage, and seizures. We're seeing also increased problems with medically complicated pregnancies: hypertension, diabetes,” Hartenbach said.

“We can't really predict which one of those women is really going to get in trouble at the time of their delivery. That's one of the difficult things and that's why you need experts who can be there you know right when they need to be.”

It’s not just a theoretical problem.

“One of the things we know is the maternal mortality rate is going up in the United States,” Hartenbach said.

“That's different than all the rest of the developing countries. And we need to pay some attention to what is going on with maternity care in the U.S. This is part of it.”