Former Mets first baseman and longtime SNY analyst Keith Hernandez...

Former Mets first baseman and longtime SNY analyst Keith Hernandez with his Bengal cat, Hadji.

Hadji was the coolest cat in New York sports, and the most famous, a longtime companion of Keith Hernandez and a social media star in his own right.

But after a long, rich life, Hadji died last week, after a decision Hernandez knew was coming but waited as long as he could to make.

“It’s with a heavy heart that I must tell you that I had to put Hadji down last week,” the former Met and current SNY analyst posted on “X” on Wednesday.

“It was his time to go. I loved him so much and miss him dearly. He was a great companion for 22 yrs. RIP my little guy.”

Hernandez followed that post with another of him and Hadji in a photo together.

“My old buddy,” Hernandez wrote, “See you in another life. I know you’ll be waiting for me with open paws.

“It was his time to go. No quality of life. He passed painlessly and with dignity. Tough one. I don’t think I’ll ever get over it.”

Reaction was swift and emotional. Within 30 minutes of the announcement, “Hadji” ranked fourth among all trending topics in the United States.

Among the many voices to weigh in was Met radio announcer Howie Rose, who posted, “Sorry to hear about this, Keith. Putting a beloved pet down is next to impossible, but you will get through it. Cherish the memories.”

In April, as Hadji was turning 21 1/2, Hernandez told Newsday that his cat was mostly blind, deaf and half the weight he was in his prime.

But, Hernandez said, “I am going to try to keep him going. As long as he’s eating and wanting to live, I’m going to give him every possible thing to help him along.”

The Bengal cat rose to fame in 2018, when Hernandez was new to the site then known as Twitter and posted a video of Hadji coming along with him to pick up the morning newspapers in his driveway.

Former Mets first baseman and longtime SNY analyst Keith Hernandez...

Former Mets first baseman and longtime SNY analyst Keith Hernandez with his Bengal cat, Hadji.

He soon became a social media celebrity. Fans waved pictures of Hadji at games and wore his face on T-shirts.

In April, Hadji’s weight was down to about 7 pounds from 15 in his prime.

Hernandez was keeping him mostly in his master bedroom, and once a week getting him hydration fluids. Hadji got shots for his arthritis and took special vitamins twice daily.

“My vet in Southampton basically said, in human years, he's approaching 100 years of age,” Hernandez said then. “So he's an old cat. But he's tough as nails.”

Hadji joined Hernandez as a kitten in 2002. He was named after a character in the 1960s animated TV show “Jonny Quest.”

When Hernandez and his second wife split in 2011, she got the dog and he got Hadji. A cat is a better fit than a dog for a traveling sports announcer.

Hadji split his time, as does Hernandez, between homes in Sag Harbor and Florida. In April, Hernandez, 71, said he expected Hadji to see one more Mets season. He did.

“The inevitable is going to happen sooner or later,” Hernandez said. “But I think he's going to make it through the season.

“I think he's going to get another offseason down in Florida in the warmth.”

Hernandez said having a beloved pet such as Hadji likely humanized him for fans in contrast to his larger-than-life persona. Now many are sharing the pain with him of having to part ways with such a companion.

“People think of [sports stars] as not having normal lives sometimes,” he said in April. “I go to the grocery store. I go to the dry cleaners. But they think that we have a life that's not the normal life.

“I think [fans] like the fact that I love animals, and I certainly love Hadji.”