Andrew Garfield portrays Prior Walter, a gay man dying from AIDS, in “Angels in America.”

Actor Andrew Garfield made a very 21st-century celebrity mistake: a forehead-slapping gaffe that fits into 140 characters.

During a Q&A session about his role as Prior Walter, a gay man dying from AIDS in Tony’s Kushner’s play “Angels in America,” Garfield offered an eyebrow-raising comment about his preparation for the role.

“As far as I know, I am not a gay man. As far as I know. I may get an awakening later in my life, which would be wonderful and I’ll get to explore that part of the garden, but right now I’m secluded to my area, which is wonderful, as well.”

The clarification drew laughs from a crowd eager to hear more about Garfield’s work in the London production of the play, which has won Tony Awards and a Pulitzer.

“Every Sunday I have eight friends over and we would watch Ru,” he said, referring to drag queen RuPaul, and provoking more scattered laughs.

But the crowd quieted down after Garfield’s next thought, which is now the center of online controversy and outrage.

“This is my life outside of this play. I am a gay man right now, pretty much, just without the physical act — that’s all,” Garfield said.

It was an inelegant explanation of how the actor was at first uneasy about taking on the role of a legendarily tragic figure in gay culture, and later diving head-first into LGBTQ literature and pop culture to gear up for the play.

“What right do I have to play this wonderful, seminal gay part?” he asked rhetorically.

Some on the Internet didn’t take kindly to Garfield’s remarks, while others lamented the story becoming a story at all.

Some took to Twitter to defuse the controversy and come to Garfield’s defense.

Other LGBT voices were not less sympathetic.

“I just feel like myself now, and it’s all thanks to my hero, Andrew Garfield. Before him, I had no idea I could exempt myself from all of the negatives of being a part of the LGBTQ community,” Christian Tucci wrote in a sarcasm-infused column for The Huffington Post.

“I look forward to no longer feeling fear, shame, and prejudice. Hooray! And to Andrew, I’m sure you’ll fare better with it than I did. (I will say, however, you are missing out on the best part!),” Tucci added.

The Daily Beast’s Kevin Fallon sought to counter the outrage machine.

“‘Celebrity Misspeaks and the Internet Piles On’ is the kind of mob-and-pitchforks genre of writing that has only grown more powerful and more exhausting as the Twitter-and-hot takes culture continues its ceaseless march to domination,” he wrote.

Garfield’s performance has earned some strong reviews, with Variety calling Garfield “outstanding” in a play where the political and social themes of the 1980s have shifted considerably.

The actor had previously spoken about the role as one that he could not pass on.

“There was no choice but to say yes because you don’t often get to work on a character like this, or on a story that has so much humanity in it,” he told the Evening Standard.

“It is a play that is about everything, it has everything in it, all the beauty and the pain of living. To get to experience that and to live that out and offer it to an audience is a privilege.”

During the recent Q&A, Garfield said he hoped to “honor” his gay friends, including those who died during the AIDS epidemic that ravaged the gay community in the 1980s.

More than 500,000 people died in the United States from 1981 to 2004 from AIDS or complications from the disease.