"Daily Show" host Jon Stewart has plenty of experience working his way through awkward moments with guests on his own show, but he inadvertently created one himself while appearing as a guest on "Late Show With David Letterman" on Wednesday.

While joking around about Mitt Romney, Letterman suggested the GOP presidential hopeful looked like the guy pictured on underwear packages.

Jumping on the comment, Stewart began riffing on Letterman and underwear. "Do you even have to wear underpants? I would think at this stage of your career, you have people who could just sit there and hug your groin for you."

Stewart continued with the joke as Letterman grew visibly uncomfortable, finally interrupting with, "Jon, I had a little trouble along those lines."

Letterman was referring to his 2009 sex scandal, in which he admitted on the air that he had conducted affairs with women who had worked on his staff. The affairs came to light when the boyfriend of one of his staffers attempted to extort money from Letterman.

The boyfriend, Robert J. "Joe" Halderman, a producer for the CBS series "48 Hours," pleaded guilty to the charge of attempted grand larceny in 2010 and served a six-month jail sentence followed by probation and community service.

When alerted that he was on sensitive ground, Stewart attempted to explain himself: "Can I tell you something terrible? I'm halfway through that bit and all of a sudden I realize ... what am I doing?"

Letterman responded, "You don't owe me an apology. Everything's fine."

Letterman then gave Stewart a pencil as a gift and swiftly ended the segment.

RELATED:

Late Night: Jon Stewart rips Catholic church over birth control

Nicolas Cage tells Letterman he's no vampire: 'I don't drink blood'

Late Night: Kate Upton tells Letterman she plans to stick around for a while

-- Patrick Kevin Day

Photo: Jon Stewart on "Late Show With David Letterman." Credit: CBS