IN a tragic medical blunder, LARRY HAGMAN  put off cancer treatment to continue working on TV’s “Dallas” reboot – and it cost the actor his life!

Sources tell The ENQUIRER that Hagman – who passed away at age 81 on Nov. 23 – knew his days were num­bered, but insisted on playing evil oil man J.R. Ewing until the very end.

The gutsy actor – who also starred in the classic ’60s sitcom “I Dream of Jeannie” – filmed six of the 18 episodes planned for season 2 of the popular TNT series before he became too weak to continue, insiders say.

“Larry Hagman didn’t have to die!” said a source close to the larger-than-life star.

“He could have sought aggressive treatment earlier, but he was so de­termined to finish as many episodes of ‘Dallas’ as he could that he hid his condition from producers and continued filming.

“He wanted to be J.R. Ewing to the very end.”

And in a heart-tugging world exclusive inter­view, Hagman’s dearest friend opened up to The ENQUIRER about the courageous actor’s final days, and reveals that he died of complications from leuke­mia – not from his battle with Stage 2 tongue cancer.

“I had no idea Larry was so serious­ly ill until his son Preston called me and said, ‘Harry, I just wanted to let you know that Dad died, and I didn’t want you to read it in the papers,’ ” award-winning writer Harry Hurt III – a close friend of Hagman’s for 30 years – told The ENQUIRER.

“Preston said, ‘Dad had tongue cancer, but in the end he died from leukemia.’ I was just blown away.

“About a year ago, Larry had been through a series of chemotherapy and radiation treatments for Stage 2 tongue cancer. He was convinced he’d beaten it, and so was I.”

After those treatments, Hagman used a humidifier in his room at the Dallas Omni Hotel, where he stayed during filming, on the advice of Os­car-winning star Michael Douglas, who has talked publicly about his battle with throat cancer.

Referring to Douglas, Hagman told a reporter: “Michael said that when you undergo radiation and chemotherapy, your saliva dries up and you can’t spit.

“He must know what he’s talking about. He had Stage 4 throat cancer. I only have Stage 2.”

In July, Hagman was diagnosed with a blood-related condition known as myelodysplastic syndrome, which eventually devel­oped into acute myeloid leukemia. But he chose to work on “Dallas” rather than undergo debilitating treat­ment, said the source.

“Had he been in aggressive treatment, Larry could have likely lived at least an­other six months,” said the source.

“But he refused to undergo continued radiation and chemo because it would have prevented him from working.”

The ailing star – a notorious boozer until he developed cirrhosis of the liver and had a liver transplant in 1995 – checked into a Dallas hospital shortly before Thanksgiving, sources say.

During his final days, he recon­ciled with his two children, ending a family feud over the care of his Al­zheimer’s-stricken wife of 58 years, Maj, who’s now in an assisted living facility in Santa Monica, Calif., said his pal Hurt.

“In one of our final conversations, I asked Larry about Maj,” Hurt told The ENQUIRER.

“Larry believed Maj was his soul mate, and watching her decline broke his heart. Because of the dis­ease, he never got the chance to say goodbye to her, and he deeply regret­ted that.

Larry also told me that his son Preston and his daughter Heidi Kristina had resented him placing Maj in a home, and they had fallen out years ago.

“One of Larry’s greatest achieve­ments was mending the broken bonds between them. In the end, all was forgiven. They truly loved one another.”

Family members and friends were at Hagman’s bedside when he passed away from complications of his leukemia at 4:20 p.m. on the day after Thanksgiving, sources say.

“Larry had been in the hospital al­most a week before he passed,” said the source.

“His immune system was shot, and his body began to fail rapidly. Finally, his heart – which was always so strong – just gave out.”

Family members and his “Dallas” co-stars Patrick Duffy, who played his younger brother Bobby Ewing, and Linda Gray, who played his wife Sue Ellen Ewing, were at his bedside, said the source.

“Larry’s last words were, ‘I love you all.’ Then he said, ‘Vita celebratio est!’” said the source.

“That’s the Latin phrase on the flag that flies outside his Malibu home. It means ‘Life is a celebration’ – and it was a fitting tribute for someone who lived life to the fullest!”

In a twist worthy of his world-fa­mous wheeler-dealer TV character, Hagman even made plans for his own demise on “Dallas”!

“Larry left explicit instructions for ‘Dallas’ producers on how they could write his death into the script,” the source revealed.

“He’d penned ideas for the plot and placed them in a sealed envelope for producers to open after his death.”

Meanwhile, his longtime pal is heartbroken.

“The last time Larry called me was the Saturday before he passed. To my great sadness I missed the call,” Hurt told The ENQUIRER.

“I was going to call him back, but I didn’t. Maybe he called to say good­bye, but now I’ll never know.

“Linda Gray sent me a text last night that said, ‘Larry was the leader of the pack.’

“She’s right. I’ve lost my best friend – and I’ll miss him every day.”