When Anna Pesce was visiting her children in Wagener, SC, in November 2014, the then-85-year-old Orangeburg, NY, native almost collapsed trying to climb a set of stairs.

“I had this horrible pain shooting up my back,” Pesce tells The Post. “I had to be carried up the stairs and put into a wheelchair for the rest of my stay.”

For the past few decades, Pesce suffered from hunchbacklike posture — the result of a herniated disc, scoliosis and osteoporosis, which weakens the bones and can lead to curvature of the spine.

“I tried everything: acupuncture, a physical therapist and seeing a chiropractor,” Pesce adds. “You feel good temporarily, but [I’d be] in pain again soon after.”

Three months after her South Carolina visit, she began working with certified yoga instructor Rachel Jesien, 28, who also suffers from scoliosis — a curvature in the spine that usually develops during puberty — and specializes in back care. Pesce’s granddaughter, also a yoga teacher, introduced the two.

Jesien visited Pesce in her home once a week, teaching her restorative poses and stretches such as child’s pose and chair savasana, in which Pesce would rest her lower legs on a chair while lying on the floor with her knees slightly bent and a strap around her thighs. After one month of sessions, Pesce was able to walk again.

“After two months, another big milestone was that [Pesce] knew what poses to do whenever the usual pains would come up for her,” Jesien says. “For example, if she was having hip pain, she’d sit on a chair and do an ankle-to-knee pose.”

By her fourth month, Pesce could do a modified headstand, with her back against the wall and her feet parallel to her head in an inverted V-shape.

“[Pesce] was timid at first, because just moving caused her so much pain,” says Jesien, who received her yoga and back-care certification from the Yoga Union center in Chelsea in 2011. Luckily, the 86-year-old was a quick learner, and they still continue to do weekly sessions after nearly two years.

Jesien says that yoga, done with the guidance of a back-care specialist, can strengthen bone density and muscles and alleviate back pain caused by osteoporosis, osteoarthritis and other conditions that affect the elderly.

She discovered back-care yoga in 2010 upon the recommendation of a massage therapist. “I had to wear a back brace for five years and went to physical therapy every week, but this was the only thing that worked,” says Jesien.

Dr. Houman Danesh, director of integrative pain management at Mount Sinai Hospital, agrees that doing yoga poses can help some people manage painful back conditions.

“Doing weight-bearing exercises like squats and lunges can definitely increase bone density,” says Danesh. “Yoga poses can be easily extrapolated to have the same effect. Physical therapists have been incorporating yoga stretches into their sessions as well.”

While Danesh recommends that people go to a physical therapist first for a proper diagnosis, he stresses that one-on-one care with a specialist is key.

“I would rather patients see a great physical therapist over a great yoga instructor,” Danesh says. “But what’s important is that people get individual care and attention.”

While older people may feel intimidated by yoga, Jesien says it’s worth seeking out a certified back-care instructor, and Pesce agrees.

“I feel wonderful now because I can drive by myself and do the things I wasn’t able to do before,” Pesce says. “I would recommend this to other people.”

Pesce’s daughter, Rosemary Pitruzzella, says she’s definitely seen a change in her mom’s demeanor.

“My mom is a lot more independent, and even how she carries herself — she just seems a lot happier and brighter now,” says Pitruzzella, 57.

Every day, Pesce practices a series of poses, from pranayama breathing exercises to a supported downward dog achieved with the help of a sling.

“She’s a tough cookie,” Jesien says. “Before we were working together, [Pesce] was so down about her condition, but now she has such a different outlook and feels so much better about her life.”