A joke about green cards by Sean Penn before handing Mexican director Alejandro González Iñárritu a best picture Oscar has provoked outrage online, with some accusing the actor of being “racist and offensive”.

Announcing the award for best picture, Penn glanced at the winner’s name on an envelope, paused, and said of the director: “Who gave this son of a bitch his green card?”

“The struggles people endure for immigration justice are not punchlines,” another wrote.

Reporters and writers also vented their outrage. Entertainment Weekly’s Nina Terrero tweeted that she would never patronize a Penn film again: “I’m just so shocked, angry [and] upset at Sean Penn’s disgusting comment. I will never pay to see any of his films ever again.”

The Washington Post’s Elahe Izadi accused Penn of insensitivity and grandstanding in Iñárritu’s moment: “Hey congrats on winning the award of your life here’s a green card joke to announce it.”

“A director of color can’t accept an Oscar without being the butt of a racist joke,” MicNews’s Derrick Clifton tweeted.

Iñarritu said backstage at the ceremony that he couldn’t be bothered less by the joke. “I found it hilarious,” he said. He had teased Penn mercilessly on the set of 21 Grams, the 2003 drama directed by Iñárritu, and he had a strong friendship with the actor.

The director also mentioned immigration in his acceptance speech: “I just pray they can be treated with the same dignity and respect of the ones that came before and built this incredible, immigrant nation.’’

In a blacklash to the backlash, some tried to justify Penn’s comment – or at least put it in context – by noting that the actor and director have known each other for more than a decade.

But that explanation did nothing to mollify many, who found the comment perhaps even more inexcusable if made as a joke between friends.

“Way to go Sean Penn for reminding us that even when it’s your Latino pal’s moment, a white dude’s gotta make it all about himself,” journalist Liliana Segura tweeted.

Writer Mikki Kendall went on Twitter to deconstruct the argument, writing: “Listen, there’s nothing friendly about making a [person of color’s] award into a teaching lesson about racist jokes even if your’e their friend.”

“I’m not doing the ‘it was a joke between friends that makes it not racist’ routine tonight. or ever really. Friends don’t do that,” she continued. “That’s the real consequence of these kinds of ‘jokes’, it takes the spotlight off the person of color [and] puts it squarely back on whiteness,” she continued. “Some of y’all believe good friends make racist jokes at your expense on a stage while… [nevermind]. I clearly have better friends.”

Patricia Arquette was also subjected to criticism after comments on equal wages for women, a theme she rallied for during her acceptance speech for best supporting actress.

“It’s time for all women in America, and the men who love women and all the gay people and people of color we’ve all fought for to fight for us now,” she said. “It is time for us. It is time for us now.”

Arquette’s call to action – deemed “tone-deaf” and symptomatic of “white privilege” – received far less vitriol than that directed toward Penn, however.