Whitney Brown was in labor with her first baby when suddenly she couldn’t breathe.

Convulsions shook her body. Ms. Brown’s blood pressure and oxygen levels dropped, and the baby’s heart rate plunged. Nurses at Saint Thomas River Park Hospital called obstetrician Dawnmarie Riley, who minutes later burst into the operating room in such a rush her hospital scrubs were inside out.

Dr. Riley delivered the baby girl in an emergency caesarean section, and Ms. Brown was taken to intensive care. Doctors at River Park, the only hospital in a central Tennessee county of 40,000 people, didn’t know what had caused Ms. Brown’s seizure. But they knew one thing: The 28-year-old woman needed more than they could provide.

What followed was a race to save Ms. Brown, a high-risk medical challenge that would involve frantic requests for transportation, an hour-and-a-half ambulance ride through mountains and the rain, and last-minute medical interventions as she tore through the hospital’s blood supplies.

Since the start of the century, it has become more dangerous to have a baby in rural America. Pregnancy-related complications are rising across the U.S., and many require specialized care. For some women, the time and distance from hospitals with the resources and specialists to handle an obstetric emergency can be fatal.

The rate at which women died of pregnancy-related complications was 64% higher in rural areas than in large U.S. cities in 2015. That is a switch from 2000, when the rate in the cities was higher, according to Centers for Disease Control and Prevention data analyzed by The Wall Street Journal.

The reasons reflect shrinking resources, worsening health and social ills. Most rural hospitals don’t have high-risk pregnancy specialists who can treat sudden complications. Many don’t have cardiologists or anesthesiologists on staff. Making matters worse, rates of obesity, a major risk factor for pregnancy complications, are higher in rural than urban areas.

Many rural hospitals have eliminated labor and delivery services, creating maternity deserts where women must travel, sometimes hours, for prenatal care and to give birth.

The number of rural hospitals that offered such services fell by 15% from 2004 to 2014, the Journal found in an analysis of Centers for Medicare and Medicaid Services data. That compared with a 5% decline among urban and suburban hospitals. Driving the changes are factors including closing of medical facilities, a decline in birthrates and the difficulties of getting malpractice insurance.

There are reported cases of pregnancy-related deaths that might have been avoided if the women were closer to hospitals with a higher level of care, said William Callaghan, chief of the maternal and infant health branch at the CDC.

Some women in rural Tennessee get no prenatal care, said C. David Adair, a professor and maternal-fetal medicine specialist at the University of Tennessee College of Medicine in Chattanooga who cared for Ms. Brown.

This article is based on interviews with doctors who cared for Ms. Brown and family members, as well as a review of her medical records.

On the evening of Sept. 30, 2015, Ms. Brown and her fiancé, Saul Simpson, packed for the hospital. Ms. Brown was 39 weeks pregnant and having her labor induced. Her sister, Jessica Campbell, stopped by their house and took a video of Ms. Brown playfully rubbing her belly and singing: “Little bitty baby, gonna come out, we’re gonna hold her and kiss her.”

By the next morning at River Park hospital, Ms. Brown’s contractions had strengthened. She asked for an epidural to relieve the pain. A test dose was administered at 8:21 a.m. according to medical records viewed by the Journal.

At 8:48 a.m., she sat up in bed and said, “I feel like I just can’t get a deep breath,” according to the medical records.

Three minutes later, with Mr. Simpson, his mother and two nurses at her bedside, Ms. Brown had a seizure that lasted about a minute.

The nurses called Dr. Riley, the obstetrician, who told them to prepare for the emergency C-section. As she scrubbed in, Dr. Riley called Regional Obstetrical Consultants in Chattanooga, Tenn., a maternal-fetal medicine practice 77 miles away by road. The medical group provides care to high-risk patients, including in rural areas. Like many rural doctors, Dr. Riley turns to outside specialists.

On a speaker phone in the operating room, Dr. Riley told a maternal-fetal medicine specialist at the practice about Ms. Brown’s condition. She said she didn’t know what had caused the seizure and wanted to get Ms. Brown to Erlanger Baroness Hospital in Chattanooga, which offers the highest level of care for obstetric and trauma services.

“Can you take a transport out of here once I’m done?” she asked. The specialist agreed and arranged for the hospital to accept Ms. Brown.

Dr. Riley made two incisions and pulled out the baby at 9:11 a.m.: 6 pounds, 14 ounces and beautiful, a nurse told Ms. Brown.

Nurses took Darlene Slaughter, Ms. Brown’s mother, and Mr. Simpson to the nursery to see the baby, named Phoenix. Ms. Slaughter touched the tiny girl’s hand and face.

Ms. Brown had a CT scan to see whether a stroke or something else might have caused her seizure. Dr. Riley initially thought Ms. Brown had eclampsia, a rare condition in which high blood pressure leads to seizures. Yet Ms. Brown’s symptoms seemed different.

Dr. Riley wondered if the seizure was related to withdrawal from opiates or other drugs. Ms. Brown was in a drug rehabilitation program during her pregnancy. A drug test during her hospital admission was negative.

As hospital staff worked to stabilize Ms. Brown, Dr. Riley called for a helicopter to take her to the Erlanger hospital. It was raining heavily, and one company after another said it couldn’t fly. Dr. Riley said she pleaded with every one, trying to persuade them to send transport.

The hospital staff next called for an ambulance to ferry Ms. Brown to Chattanooga. There wasn’t one immediately available, Dr. Riley said, and they were forced to wait. Warren County EMS-Rescue, which serves the hospital, said only two of its five ambulances are allowed out of town at one time.

At 12:20 p.m., more than three hours after Phoenix was born, Ms. Brown was loaded into a Warren County ambulance. Ms. Slaughter said she saw her daughter shortly before she left: “Her eyes was open, she was looking around, but she was very confused.”

Dr. Riley came out to talk with the family and saw Ms. Brown’s aunt, her next-door neighbor, and promised to text with updates.

The ambulance sped off on the 90-minute ride over two mountain ridges to Chattanooga. Shortly before the ambulance arrived at the Erlanger hospital, Ms. Brown’s heart stopped.

Ms. Brown, an outgoing former high school cheerleader, grew up in McMinnville. The town of 13,761 residents was known locally as the “Nursery Capital of the World” for the growers who supply shrubs and flowers across the U.S.

She studied nursing after high school and worked as a nursing assistant, a job she loved. She fell short of hours needed to graduate but completed a separate course as a medical assistant in 2012.

Ms. Brown couldn’t find work in her field and began to drift. She developed an addiction to opioid painkillers and other drugs that led to an arrest and jail. In 2014, she entered a court-supervised drug rehabilitation program and began working as a waitress.

© Jessica Brown Campbell

“I am flawed, broken and a disaster,” she wrote on her Facebook page in November 2014. “But I get up everyday and do what I am supposed to do. Drug court, work full time, and work on my self daily.”

The next month, she started dating Mr. Simpson. The two had connected at a drug-court meeting and bonded quickly over their experiences.

Ms. Brown had wanted a baby girl for as long as she could remember. A marriage at age 23 had lasted only a year and a half. Later, she had two miscarriages, including one just before she started seeing Mr. Simpson.

In January 2015, Ms. Brown became pregnant again and that spring learned she was having a girl. “She was just beside herself,” her mother, Ms. Slaughter said.

A baby gave her a new chance, said her sister, Ms. Campbell: “She thought it would give her something to live for.”

A relapse landed Ms. Brown back in jail for a few weeks early in her pregnancy. But, determined to get her life back on track, she requested readmission to the drug-court program.

Ms. Brown decided to name her baby Phoenix after the mythological bird that rises from the ashes. The name was intended to mark a new life for her and her daughter, her sister said.

With her heart stopped, emergency medical technicians in the ambulance began administering CPR. They arrived at the emergency room of the Erlanger hospital five hours after Ms. Brown’s seizure. She was bleeding heavily.

The medical staff harnessed the hospital’s manpower and resources. One team worked to resuscitate Ms. Brown, while others tried to stop the bleeding. Teams jostled around Ms. Brown, who began receiving blood transfusions and medication to get her blood to clot.

“There had to be probably 70 people from various factions there trying to help her,” said Dr. Adair, director of women’s services at the hospital and head of the maternal-fetal medicine practice that works with rural practices, including Dr. Riley’s.

By the time the teams had stabilized Ms. Brown’s vital signs, she had been in cardiac arrest for 16 minutes, a period when her organs were deprived of oxygen. Doctors performed a CT scan and found swelling in her brain, indicating likely damage, Dr. Adair said.

More immediately, Ms. Brown’s bleeding hadn’t stopped and no one knew why. As they worked, though, Dr. Adair and his team started to connect the dots. Ms. Brown’s crisis had started when she couldn’t breathe; then the seizure and low blood pressure; then the bleeding.

One of the medical residents spoke up. “Dr. Adair, do you think it could be AFE?”

”Yes,” Dr. Adair responded. “That’s exactly what I think.”

They were referring to an amniotic fluid embolism, when a mother develops shock from an allergic-like reaction to amniotic fluid entering her circulatory system. It is rare, often fatal and usually strikes in two stages.

First come sudden respiratory distress, seizure and often cardiac arrest. After minutes or hours there is rapid hemorrhaging. There is no test, treatment or cure for AFE, which is akin to the anaphylactic shock some people develop from bee stings or peanuts. It carries a mortality rate of 40% to 50%, according to the AFE Foundation, even in well-equipped hospitals.

Saving these women requires quick response. “In a primary rural setting, those people are going to get overwhelmed really fast,” Dr. Adair said.

AFE had crossed Dr. Riley’s mind at River Park hospital. She knew it was rare and a nightmare. River Park had nowhere close to the volume of blood needed to keep Ms. Brown alive if she started to bleed, Dr. Riley said.

Dr. Adair and his team at the Erlanger hospital brought Ms. Brown to an operating room, where they found “massive amounts” of blood in her abdomen, according to Dr. Adair’s consultation report. They tried several ways to stop it.

The hospital received more supplies from the blood bank, eventually giving Ms. Brown more than three times her body’s blood volume. The medical teams finally stabilized Ms. Brown and transferred her to the intensive care unit.

Dr. Adair spoke with Ms. Brown’s family and friends, who had arrived in several cars from McMinnville. The doctor, dressed in scrubs, explained that he believed Ms. Brown had AFE, and that she could have brain damage.

The next 24 to 72 hours would be crucial, he said, as doctors tried to keep her blood pressure and oxygen levels stable.

“There’s a very good chance we may not pull this out,” he told the family.

Baby Phoenix was transferred to Erlanger and Mr. Simpson held his daughter for the first time that night in the hospital’s neonatal intensive-care unit.

As the family waited, a nurse asked Ms. Slaughter if she would like to see her daughter. “I’m gonna tell you right now, she don’t look nothing like she did,” the nurse said, according to Ms. Slaughter.

The mother couldn’t bring herself to witness the scene. Mr. Simpson went instead. Ms. Brown was swollen beyond recognition. He sat with her, talking, praying, and playing the George Strait song “You’ll Be There,” said Ms. Campbell, who came to the room too.

In the middle of the night, hospital staff came to the waiting room. Tests had failed to detect any brain activity, they said; the family should consider letting Ms. Brown go. Ms. Slaughter let Mr. Simpson decide.

Family members crowded into Ms. Brown’s room. Ms. Campbell barely recognized her sister, except for a familiar rose tattoo on her left shoulder. She took Ms. Brown’s hand.

A nurse detached Ms. Brown from the machines that kept her alive and turned away the monitor screens. Minutes later, Ms. Brown’s heart stopped.

The time of death was 5:08 a.m., less than a day after Whitney Brown gave birth to the baby girl she had long wanted, but never held.