Friends fear TV legend JAMES GARNER has only a few short weeks to live after suffering another debilitat­ing stroke, The ENQUIRER has learned exclusively.

The former “Rockford Files” star was surrounded by family and a few close pals at his Brentwood, Calif., home on April 7 to mark his 85th birthday, but sources say it was a somber celebration.

“James is fading fast,” a close source disclosed. “(His wife) Lois and the rest of his family want to make him as comfortable as possi­ble. They want to see him live out his final days at home, not in a hospital.

“HE’S MADE IT LONGER THAN anyone expected, but he’s very ill, and his friends are afraid he could be gone in a few weeks.”

Garner – who shot to fame in the ’50s as TV’s “Maverick” – hasn’t been seen in public since 2008, the year he suffered a catastrophic stroke and plunged into a deep depression.

Since the stroke, Gar­ner has been confined to a wheelchair, slurs his words and is virtually home­bound. Sadly, the actor suffered another “mini-stroke” more recently, con­firmed a longtime pal.

“He never recov­ered from the first stroke, and the sec­ond stroke, which was hushed up, (and) only weakened him more,” said the pal. “He’s been cheating death for a long time.”

Garner, who has been married to Lois for 56 years and has two daugh­ters, has faced numerous health woes.

A longtime smoker, he underwent quintuple bypass heart surgery in 1988. Just three months later, he needed another operation for a potentially deadly aortic aneurysm.

THEN, in 1994, surgery to clear a blood clot in his leg led to a staph infection. And he was raced to the hospital twice in the late 1990s be­cause of blood clots in his leg.

Garner has also struggled with personal loss. He’s had a tough time getting over the 2011 death of his older brother Jack, says the source, and still mourns the loss of close friends Paul Newman and Peter Graves, who died in 2008 and 2010, respectively.

“James loves Lois and their daugh­ters, but he’s fought the good fight,” added the source. “He’s ready to join others he dearly misses.”