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

A pregnant woman stranded in a Northern California forest says she was forced to give birth alone — but that was just the beginning of her three-day ordeal.

Amber Pangborn, 35, said she fended off swarms of bees and mosquitoes, lived off of apples and what little water she happened to have with her, and then started a forest fire that ended up burning out of control, according to NBC affiliate KCRA in Sacramento.

“I thought we were going to die,” said Pangborn, of Oroville, located just outside Plumas County National Forest.

She told the station that she was driving to her parents’ home when she felt like she might be going into labor, and decided to take a back road through a remote part of Plumas.

Her timing was unfortunate: Pangborn said she ran out of gas and couldn’t get cellphone reception. During that time, she gave birth to a daughter.

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

She told KCRA that she had to swat away bees and became fearful of bears while she hoped a passerby might randomly find her and her newborn, whom she named Marisa.

Finally, on Saturday, she grew desperate. She said she started a brush fire using her hairspray and lighter.

“The whole side of the mountain caught on fire,” Pangborn said. “I was looking at Marisa and was like, ‘I think Mommy just started a forest fire.’”

California woman, Amber Pangborn, gave birth while stranded on a road in the Plumas National Forest after getting lost on the way to her parents' home. NBC News

She had — but it may have saved her life.

The U.S. Forest Service confirmed that they responded to the flames and finding a mother and her newborn baby inside a car. An ambulance was called as fire crews battled the quarter-acre blaze. The cause of the fire remained under investigation Tuesday.

"Our thoughts and best wishes continue to be with the mother and baby," Chris French, the Plumas forest supervisor, said in a statement. "We are very pleased with the professionalism and cool-headed decision-making of our fire response crew."

Pangborn and her daughter were taken to separate hospitals for observation, KCRA reported, and were expected to be reunited Tuesday.

The new mom or her family couldn't immediately be reached for comment. Pangborn’s mother, Dianna Williams, told KCRA station her daughter and granddaughter are doing fine.

“I’m elated, and the baby’s beautiful,” said Williams, adding of her daughter's actions: “I’m glad that she’s a smart kid. She’s always been smart.”