Regis Philbin was never formally on the payroll of “The Late Show With David Letterman,” but he might as well have been.

When Letterman retired in May 2015, Philbin, the TV veteran who died on July 24 at 88, emerged as the most frequent visitor to joke and spar with Letterman in the guest chair over the CBS late-night franchise’s 22-season run. He logged 136 appearances, far more than the No. 2 guest, animal handler Jack Hanna, at 75. Philbin also had numerous appearances during Letterman’s NBC days on “Late Night With David Letterman.”

Philbin made a career out of a being a TV host who made the rounds of every other talk show on the air — always with a wry smile and a great story at the ready. But his Letterman visits were always extra special. The two are clearly cut from the same cloth as men who seem born to speak extemporaneously on television.

In a statement, Letterman hailed his longtime friend as on a par with the idol of late-night, Johnny Carson.

“In the same category as Carson. Superlative,” Letterman said in a statement on Saturday. “He was on our show a million times, always the best guest we ever had, charming, lovable and could take a punch. When he retired I lost interest in television. I love him.”

Philbin’s most indelible moment on the “Late Show” stage came on Sept. 17, 2001, as Letterman resumed the show after a week break in observance of the 9/11 tragedy. Philbin followed then-CBS News chief anchor Dan Rather as one of two guests on the show. As always, Philbin came on for comic relief in the form of a playful conversation in which the two ribbed each other.

“This is quite a show you’ve got. Tough seat here,” Philbin said as he sat down.

“What do you want?” Letterman said with mock anger.

“You know, I was booked six weeks ago,” Philbin shot back.

As they bantered a bit more, Philbin gave Letterman his blessing for the decision to resume new telecasts: “The American people want to see you back again. They gotta see you Dave.”

To which Letterman replied: “You think Kathie Lee will come back?” That was a gentle dig at the then-recent replacement of Philbin’s longtime co-host, Kathie Lee Gifford, on the “Live” morning show franchise that Philbin hosted for nearly 30 years.

The exchange got a big laugh, and both veteran sparring partners looked extremely relieved.

(Pictured: Regis Philbin and David Letterman)