Conan O’Brien’s relationship with geek culture probably peaked in 2002, at least for those who fondly remember Triumph the Insult Comic Dog’s playful drubbing of “Star Wars” fans waiting outside for “Attack of the Clones.” Yet the host seemed to harness those forces to his advantage with his four-night stint hosting from Comic-Con in San Diego, which could have hardly come at a better time in terms of putting his TBS program back on the map for some who might have drifted away.

For O’Brien, whose visit to Cuba in March was invigorating but felt a tad hasty (for understandable reasons), these well-plotted, star-studded shows had an amiable and relaxed quality, showcasing his smarts, quickness and grasp of the current cultural landscape. Just as significantly, they offered a reminder of the place he occupies in an increasingly vanilla-flavored latenight field, especially with his spiritual sire David Letterman and Jon Stewart signing off.

While that might not come as news to proud members of Team Coco, his audience on TBS remains relatively puny even compared to the lowered standards of network latenight. So parachuting into Comic-Con proved an enormously shrewd move, placing him at the center of the pop-culture universe during what amounts to its five-day annual nerd prom, thrusting him squarely into the center of the conversation.

From the opening-night intro featuring a spoof of “Mad Max: Fury Road” to monologues filled with Comic-Con-savvy jokes to an unexpected visit Saturday from “Doctor Who’s” Peter Capaldi, these shows featured a clear sense of planning to connect with an audience steeped in movies and TV.

Granted, not everything worked. The producers should have balked at hosting so many members of the “Game of Thrones” cast – it was fun for a second, but unwieldy in practice – although it did set up an amusing follow-up gag involving Liam Cunningham, who sat through Friday’s episode without getting a single word in. O’Brien fared better with trios from “The Hunger Games” and “The Walking Dead,” and especially with the cast of “X-Men: Apocalypse,” aided by the interplay between James McAvoy and Michael Fassbender.

Overall, though, O’Brien seemed to derive considerable energy from the enthusiasm of the crowds, and hosting guests in this more relaxed setting yielded dividends, almost mirroring the adoring atmosphere inside the convention center. When he closed the final show by saying this was “one of the best weeks I’ve ever had” – and pledging to return next year – it was hard to disagree on either score.

Indeed, in an age so dominated by blockbuster genre movies and TV, being the go-to place for promoting such offerings would hardly be a bad move strategically. But even if that approach doesn’t carry over much beyond this week, strictly on its own terms, these episodes were a kind of triumph.