His body battered and neck broken, Kevin Shea’s life hung from a thread on Sept. 11, 2001.

The third-generation firefighter was just outside the South Tower when it collapsed. He was blown out toward the street, and crawled 200 feet through the blackness until he saw a “bright light.” It was a burning Con Ed gas pipe. Then he “surrendered to the conditions.”

He was found, unconscious, lying amid the twisted steel and crushed concrete near Albany and West streets. He was dragged out only minutes before the North Tower fell.

Shea was off-duty. He had finished a 24-hour tour with Ladder 35 at 7:30 a.m. and could have gone home. But he lingered at his Amsterdam Avenue firehouse, and was packing his gear when the fateful alarm sounded.

“There was an extra seat on the engine,” he recalled.

“I’ll take that, sir,” Shea told his lieutenant.

It wasn’t until the next day, while lying in a Newark hospital bed, that he would learn he was the only one of 13 members of his Upper West Side firehouse to make it out alive.

“I survived through luck — and they did not,” Shea told The Post of the Ladder 35/Engine 40 brothers he still mourns.

This holiday season, the 50-year-old hero celebrated his amazing fortune by giving the gift of life to a stranger — a 59-year-old special-ed teacher from Orange County, Calif., in desperate need of a kidney.

And as if lifted from a Hollywood script, the recipient grew up in New York City, idolizing firemen.

“It’s absolutely a miracle!” a joyous Lois Knudson told The Post. “I will never need another Christmas gift.”

She said she “got chills” when she was told that her life-saving donor was a fellow New Yorker and unlikely survivor of 9/11.

“I don’t think firefighters get the recognition that they’re due. 9/11 was so devastating and so huge. But they are always risking their lives. You don’t hear about what they do on a regular basis.

“He saves lives all the time, that’s what he does,” she said of Shea. “And [now] he saved another New Yorker from across the country.”

Knudson has a degenerative and always fatal kidney disease that runs in her family. Her sister died from it, and her mom succumbed to it at 42 — when Knudson was only 5.

Afraid to pass on the deadly gene, she and her husband Tom decided not to have children. Instead, the couple channeled their love of kids into teaching special-education students for 37 years. Knudson has won five Teacher of the Year awards.

She had been on a waiting list for an organ for four years and on dialysis — “hooked to the machine three days a week for three hours at a time after teaching a full day” — for 15 months when she got the phone call that would change her life on Nov. 21. It was “two days before Thanksgiving.”

The UCLA organ-donation coordinator said, “We found a match for you! A man in his 40s from the Northeast.” Her husband of 30 years “broke down in tears of joy.”

Fourteen different friends or family members had already tried to give their kidney to Knudson. A principal she once worked for had high-blood pressure and was rejected. Two friends who had past cancers were turned away. Doctors found one potential benefactor had too much protein in his urine.

“In the last couple of years I’ve had so many people come forward to donate but it didn’t work out,” Knudson said. “People were disappointed and felt bad, but I felt it just wasn’t my time and that my time will come.”

Back in Long Island, Shea, who had been donating blood for years, had filled out a series of online questionnaires with the National Kidney Registry.

He was interested in signing up for a program that allows living people to donate organs to anonymous individuals. The practice is rare, with only 1 to 2 percent of all living donations — which are far more successful than organs coming from a deceased person — destined for a stranger.

Knudson was eligible for the Shea donation because her niece, Jessica Ellis, was also donating her kidney to a stranger as part of a national “chain” of altruistic donations.

Shea was approved as a potential donor, and by the end of July had an appointment at New York-Presbyterian/Weill Cornell Medical Center for a battery of medical screenings and even a psychological survey.

The humble, 5-foot-8, 160-pound Shea struggled to explain his altruism to The Post.

“I really don’t know what drives me. I wish I had some great explanation. But the way I look at it, I have an extra kidney and there’s someone out there who definitely needs one,” he said.

Knudson certainly needed one, and finally, she had hope that a match had been found.

“I always knew I would get a kidney,” she said. “But this is a miracle that it’s him. I feel like I got the right person.”

While Knudson was being prepped for transplant surgery on Dec. 5 at Ronald Reagan UCLA Medical Center, Shea was already under the knife in Manhattan.

An hour before going into the OR, with a Post reporter and photographer at his bedside, Shea was relaxed and ready.

“I like making [his hospital care team] laugh because I feel they’re more concerned than I am,” Shea said. “They keep on shaking my hand for some reason and I’m going, ‘It’s good, it’s good.’ I don’t think it’s a big deal. They think it’s a big deal, so it’s nice. I want them to relax.”

Dr. Sandip Kapur, chief of kidney transplant surgery at New York-Presbyterian/Weill Cornell Medical Center, called Shea a “true hero.”

The day before surgery, Shea ate six scrambled eggs at noon and then watched the “horrible, stupid” 2013 movie “Hell Boy.” “It was something to pass the time,” he laughed. He checked into the hospital at 4 p.m. and got four hours sleep.

‘He saves lives all the time, that’s what he does.’

At 5 a.m. the next day, Dr. Joseph Del Pizzo made a three-inch incision through the belly button to begin the two-hour procedure. At 6:30, the kidney was removed, packaged in a medical cooler, driven to Kennedy Airport, and put on a commercial American Airlines flight to LAX. It was delivered to UCLA Medical Center at 3:30 p.m. West Coast time, where Dr. Jeffrey Veale was standing by.

Thirteen hours after it was harvested, Knudson had a new kidney.

Because of medical privacy laws, Knudson was not initially told the identity of her savior.

After Post inquiries into the unusual organ-donation case, Shea agreed to tell his story and Knudson signed consent forms last week that allowed the teacher and retired firefighter to finally learn each other’s identities.

On Friday, Shea texted Knudson hello. An excited Knudson called him right back.

“This is Lois,” she said.

“I knew it was you, he replied.

They had an emotional 20-minute chat, during which Knudson “thanked him so, so much” before they fell into “a normal conversation.”

It felt like they had “known each other all along,” she said.

Knudson says “I’m feeling great. I’ve never felt better.”

Shea, who calls himself a “solutions guy,” is on the mend and already thinking about his next adventure: building a wildlife preserve in Nicaragua.

He likened his gift of life to his days as a city firefighter.

“It’s a team effort. We get the job done, we save a life and then we move on,” he said. “We go back, we celebrate a little bit and we wait for the next job.”