MIAMI — Jack Ramsay, a Hall of Fame coach who led the Portland Trail Blazers to the 1977 NBA championship before he became one of the NBA’s most-respected broadcasters, has died following a long battle with cancer. He was 89.

His family announced his death, saying he “led the greatest life that one could lead.”

Ramsay coached in the NBA for parts of 21 seasons before embarking on a second career as an NBA analyst for ESPN. He was diagnosed with melanoma in 2004. He later battled growths and tumors that spread to his legs, lungs and brain, as well as prostate cancer and most recently a marrow syndrome.

His affinity for fitness never wavered, though. Ramsay, who competed in at least 20 triathlons, worked out regularly into his 80s, even as he battled the various forms of cancer. He often spoke of his love of swimming in the Gulf of Mexico near his home in Naples, Fla., or jogging in a pool or from wall to wall in his hotel room when on NBA assignments.

“He’s probably forgotten more about the game than I know,” Miami Heat coach and president Pat Riley once said of Ramsay, whom he counted as a close friend.

Ramsay also spent several years late in life caring for his wife, Jean, who was diagnosed in 2001 with Alzheimer’s disease. She died in 2010.

“He was that rarest of men with a unique style that was inspirational and motivational about basketball and life itself,” said Paul Allen, who owns the Trail Blazers.

Ramsay was born Feb. 21, 1925, in Philadelphia and enrolled at Saint Joseph’s in 1942, eventually becoming captain of the basketball team there for his senior season.

He earned a doctorate in education from the University of Pennsylvania in 1949, explaining the “Dr. Jack” moniker by which most players and fans knew him.

Ramsay started coaching his alma mater in 1955, going 234-72 and taking the Hawks to the NCAA tournament seven times and the Final Four in 1961.

He became coach of the Philadelphia 76ers in 1968, joined the Buffalo Braves in 1972 and Portland in 1976. With a team featuring Bill Walton and Maurice Lucas, he delivered an NBA championship in his first season, beating the 76ers in six games in the final series.

“For me, it was a once-in-a-lifetime experience and one that I will cherish forever,” Ramsay said in 1997.

Ramsay was 864-783 in his NBA career and in 1996 was honored as one of the league’s top 10 all-time coaches.

When he left the Pacers, Ramsay began working as a television analyst on 76ers games. Eventually, he worked on Heat television broadcasts for eight seasons before moving full time to ESPN as a radio and TV commentator before the 2000-01 season.

Ramsay’s funeral is Thursday.