IT WAS ODD, a quirky approach, as if the comic bit, in the minds of the show’s writers, could snidely be subtitled The Hoosier and the Loser. Several years in, as the upstart following Carson, David Letterman and his “anti-talk show” approach still felt not just fresh, but daring, and its signature irony could become cutting, moving into wink-to-the-audience mockery. On one hand, Letterman, the Man from Indiana, celebrated the idea of his fellow American Everyman, but his show’s sensibility could simultaneously wear a hip smirk, a bit of gap-toothed smugness that could turn a little ugly. Irony required a victim, a target, and Dave’s ’80s comedy had talons.

But Harvey Pekar, the comics bard from Cleveland, the “curmudgeon with a heart of gold,” was nobody’s comedy patsy.

The running “on-the-couch” bit made for great TV, but to a degree, it also shined a distinctive new light on Letterman. When irony meets smart authenticity, the smiling man behind the corporate desk doesn’t always win — even though in the big picture, the young show clearly benefited from the verbal skirmishes between Harvey and Dave. Letterman and his team of writers liked to script the line of comedic engagement, but a Rust Belt poet of the prosaic could, in the moment, get off the best — and truest — spontaneous lines.

It was the fall of 1986, and the frisky Letterman, in his 30s, was in a stretch of show that would be remembered largely for way off-script appearances by such performers as Madonna and Cher, Andy Kaufman and Crispin Glover. And on Oct. 15 of that year, Letterman hosted a man who remains one of his most memorable recurring guests ever — even through the rear-view mirror of Dave’s 33-year late-night run, which concludes tonight on CBS with a big farewell.

Pekar, this father of street-level autobiographic comics, had recently published an “American Splendor” anthology through Doubleday and had become a critics’ favorite, even as he maintained his day job as a VA Hospital file clerk in Cleveland. Pekar, then in his 40s, loved his literature and his jazz, and in certain ways was more intellectually cultured than Dave, the quick-witted former weatherman out of Ball State. Yet in the made-for-TV dynamic of the New York spotlight, Letterman’s show seemed primed to play Pekar for a few laughs.

The pairing, instead, made for some sublimely revealing television. And sitting in perhaps the best seat in the house, within the green room, was Harvey’s wife and eventual comics collaborator, Joyce Brabner (“Our Cancer Year”).

“Harvey had no concept of television,” acknowledges Brabner, author of the recent graphic novel “Second Avenue Caper: When Goodfellas, Divas and Dealers Plotted Against the Plague” (illustrated by Mark Zingarelli). “The first TV show he ever [did], in Pennsylvania, this woman host was so freaked out that her microphone fell off. And onstage, on camera, Harvey dived under the table to [retrieve] it.”

When Pekar got the call from New York, he had never even seen Letterman’s late-night show, then on NBC. “We had to rent a VCR, because we didn’t have one,” Brabner tells The Post’s Comic Riffs. “He watched the show for five minutes — he didn’t care.”

But still, though the Ohio bard was unimpressed, Pekar and Brabner went. “I convinced him it was good promotion,” recalls his widow. “It was a free trip to New York, and it allowed me to take care of other business.”

So on that October evening, Pekar was the episode’s final guest, a little-known curiosity following in-house NBC talent Tom Brokaw. It was the comic-book guy, though, who would make the news.

“I ain’t no show-biz phony,” Pekar said in his “Late Night” debut, firing the opening salvo in his made-for-TV showdown. Just like that, Harvey would begin to pull a bit of a role reversal on who was quirky in this interaction, and who had the cachet of cool.

It’s not just that Pekar would come to accuse Letterman of being a corporate “shill” because NBC was owned by General Electric, which was producing nuclear-weapon materials (the environmental effects of which, several years later, would prompt the Oscar-winning short “Deadly Deception”). It’s that the comics writer — who first famously collaborated with R. Crumb — saw Letterman as a talent who had cashiered his own creativity.

“He didn’t get to be creative and he didn’t get to be independent,” Brabner says of the Letterman she witnessed in the ’80s. “How could you not [be frustrated] if you have that kind of talent? He was stuck in that chair. You’re reading from those cards that someone else created for you, and someone is telling you what to say.”

Letterman, though, seemed to relish the spontaneous skirmish in those years — it created an air of danger not found on Carson — and the host would have Harvey on again the following January. The bookers knew it made for good TV, as long as the sparring Pekar didn’t go too verbally “nuclear” himself in his rants against GE as an arms manufacturer.

Pekar and Brabner saw some perks to these flown-in appearances. “He became part of the [actors’] union, so he got paid,” Brabner tells Comic Riffs. “For us, it was like: You go to another city, you drop in and visit somebody, you go talk to them for 15 minutes. The rest of the trip, you go see your real friends.”

They also attempted a side project. On the show, Pekar hawked the Harvey dolls made by Brabner. “We did the doll thing,” she recalls, “and then we came back and there was a ton of messages on the machine. One was a Japanese toy manufacturer. For 30 seconds, I was saying, ‘Oh my God, this is it. … We’ve stepped into deeper waters.’ And then I called them back and it was B.S.”

And by the summer of ’88, the “Late Night” sitdowns had continued to escalate in tone, until Pekar pointedly asked Letterman why he had “defended” GE, putting Dave directly on the spot. Letterman told Pekar that this wasn’t the forum for this discussion, and said that Pekar was a “dork” who had been given a chance to promote his “little Mickey Mouse magazine here, your little newsletter, your little clubhouse, fun-and-games, rainy-day fun for boys and girls, weekly reader deal here.” The cartoonist told Letterman he was “full of s—” (bleeped for broadcast), and the host told Pekar he was never returning to the show. (These scenes are recounted in the Oscar-nominated 2003 film “American Splendor,” in which Paul Giamatti portrays Pekar, and Hope Davis is Brabner.)

The rumor was that Pekar was banned, but Letterman, in having Harvey back on in 1993 and ’94 — the latter time on CBS — played down the sparring as “a falling-out, a misunderstanding,” and recently cited his own immaturity in handling the disagreement.

During that span when Pekar didn’t appear, the show actually reached out, Brabner says. “There were times he wouldn’t go on the show” when they called, she says. “He’d say: ‘I’m sorry, but my [VA] buddy is not at work tomorrow and I’ve got to cover his shift… But you can’t tell me that there’s nobody in New York you can’t get to do this instead.”

Appearing on Letterman opened other Hollywood doors, too — entertainment threshholds that Pekar had no interest in crossing.

“Harvey was offered his own talk show,” Brabner tells me. “When Fox was first setting up a network and they had the Joan Rivers show, we got a call from California: ‘Harvey, we really think you’re great and think you’re wonderful.’ Harvey said: ‘No! I’m not going to be part of some 13-week experiment that’s going to fail. I’m not going to do it.’ He hung up on them.

“A day or two later, we got another call,” Brabner continues. ‘Terrific news, Harvey. We had a meeting and the show can be done in Cleveland.’ Harvey said: ‘What are they wasting my time for on this? Do you think I want to come home from work and talk to some simple-minded starlet? I have things I want to do and things I want to read.’

“He would have been sitting and listening and having this parade of people come by. It’s too painful, even for the outrageous amount of money they were waving around.”

These days, five years after Pekar’s death from an accidental overdose of antidepressants, Brabner creates her own comics and continues to make her Harvey dolls. “I only made those dolls for charitable purposes, and I do make the dolls now for when people ask me. We have a whole new thing with the new dolls.”

Reflecting on those eight years, Brabner says that despite more than a half-dozen appearances, her husband never really got to know Letterman. “They talked a little bit between commercials, but [Harvey] didn’t even know him,” she says, “and what of he knew of him, he felt sorry for him.”

That’s because Pekar, as an indie comics writer, had creative autonomy, whereas Letterman, the former standup and comedy writer, had become the face of a machine, Brabner says.

“I’d say Letterman really got painted into a corner, thwarting his opportunities to be creative,” she tells Comic Riffs. “People think the show gave Letterman an opportunity, but they don’t see the table with 10 guys in shorts wearing baseball caps pitching jokes for things for him to say. They don’t see the index cards that say: ‘Ask this first.’ It’s all spelled out for him, and everything is pre-interviews. He’s basically had to be this hand puppet, with everybody’s hands up his butt to tell him what to say and do.

“Harvey was a surprise to him,” Brabner continues, “and because Harvey was completely off the card, Letterman liked that, even though he was confused by it.”