Green Book director Peter Farrelly apologized Wednesday for flashing actress Cameron Diaz with his penis back in 1998. He says it was all an immature joke.

According to contemporaneous news reports, two decades ago, when he and brother Bobby (then 40 and 41) were directing comedy hits like Shallow Hal and There’s Something About Mary, Peter was big on flashing his penis to the unsuspecting.

The Cut found a 1998 Newsweek story about how the brothers would set up their mark — both male and female, including Diaz and Fox chairman Tom Rothman:

The Farrellys have concocted a variety of clever ploys designed to get you to look at it. Bobby, 40, is the straight man, all innocence as he lays the trap. Then Peter — lankier, edgier and a year older — delivers the coup de grace. You may think you’re going to be examining a mysterious blotch on Peter’s torso, or checking out his new watchband. The reality is a good deal more shocking, but as actress Cameron Diaz puts it, “When a director shows you his penis the first time you meet him, you’ve got to recognize the creative genius.” … Has [Fox executive Tom Rothman] ever been taken in by one of Peter and Bobby’s trademark gags? Has he seen … it? “I have been flashed,” he admits. “It wasn’t a pretty sight. In fact, I’m still recovering.”

A 1998 Observer article offers more details:

Apparently, I say nervously, Peter showed Cameron his penis during the filming … Peter interrupts, horrified: ‘No. We did it before she was in.’ So you risked losing a big star by showing her your penis before she was on board? Peter smiles at my foolishness. ‘Of course! That’s what got her in.’ He stops smiling for a moment. ‘It’s a joke,’ he explains patiently. ‘It’s not like I make a habit of just whipping it out and saying, ‘Hey! Look! My cock!’

Peter admitted to the Observer he had done this “easily 500 times.”

“I don’t like it when they laugh at my penis,” he told the Observer. “But I do like it when they stare.”

From the sound of it, the “joke” was performed for shock value, not for sexual gratification, and in 1998 no one really cared. At the time, flashing a flaccid penis was seen as a more shocking version of mooning someone with your bare butt, not a career-destroying #MeToo moment.

Of course, there is a legitimate flip-side to that argument. At the time, women like Diaz might have felt pressured to go along to get along, to not rock the boat for a hit maker like Farrelly — which is why we have probably not heard the last of this story. We could start to hear from a lot of women, including Diaz, who found it sexual and degrading but were afraid to say anything in 1998.

Farrelly released a statement to the Cut Wednesday apologizing for his 20-year-old behavior.

“True. I was an idiot,” he said. “I did this decades ago and I thought I was being funny and the truth is I’m embarrassed and it makes me cringe now. I’m deeply sorry.”

Also under fire is Green Book screenwriter Nick Vallelonga over a 2015 tweet where he agreed with then-candidate Donald Trump’s claim about Muslims in New Jersey seen cheering 9/11.

Replying to Trump, Vallelonga wrote, “100% correct. Muslims in Jersey City cheering when the towers went down. I saw it, as you did, possibly on local CBS news.”

Vallelonga has now deleted the three-year-old tweet, but he was 100 percent correct about this, including the fact the report was on a CBS affiliate.

On September 16, 2001, CBS reported:

Just a couple of blocks away from that Jersey City apartment the F.B.I. raided yesterday and had evidence removed, there is another apartment building, one that investigators told me, quote, was swarming with suspects — suspects who I’m told were cheering on the roof when they saw the planes slam into the Trade Center. Police were called to the building by neighbors and found eight men celebrating, six of them tenants in the building.

The overall context here is the Oscar race. Green Book just won a Golden Globe for Best Drama, which gives it serious momentum in the Oscar race. This is when the knives come out.

Follow John Nolte on Twitter @NolteNC. Follow his Facebook Page here.