Neil Patrick Harris — nay, his character Hedwig — let an angry F-bomb fly during a performance of the Broadway musical Hedwig and the Angry Inch on Saturday.

The How I Met Your Mother star, who plays an angsty, transgender rock musician in the show, was reportedly reacting to a female fan who yelled out “I love you, Neil!” during the show.

The actor shouted, “I’m doing something up here!” — adding a derogatory term that we won’t republish — and his response was met with rapturous applause, the tab said.

But that’s just the short of it.

The long of it includes the actor taking to Twitter later to explain the outburst, which he chalks up to a reaction that his character had, not himself.

“It seems my Hedwig improvs are making news, but one should have the full story/context ... #thanks,” he wrote.

The Emmy Awards and Tony Awards host then linked to a Gossip Cop story that said Hedwig was indeed the culprit.

“The response to the fan yelling was actually done in character — Neil as Hedwig, not as though Neil stopped the show to respond out of character,” a rep for Harris told the website.

Would that we could all use the same excuse ...

Anyway, Gossip Cop said the show is “highly improvisational” and Harris and his co-star Lena Hall used the outburst as an opportunity to do something that their alter egos might do:

“When the fan initially yelled, ‘I love you, Neil,’ Neil [as Hedwig] then responded, ‘Who’s Neil? I’m not Neil.’ He then looked over at Yitzhak [played by Lena Hall] and said, ‘Are you Neil? You better not be Neil,’ followed by Hedwig then offering the quote in question.”

The rep added that “it was all done in good fun, and fully in the context of the show. The audience went crazy and it really was a light-hearted moment, which is not being properly contextualised in any of these various posts.”

And that’s something we’re trying to do here... !