James Gandolfini wasn’t jerking around on the set of “The Sopranos.”

The late actor — who tragically passed away in 2013 — reportedly threw a “tantrum” after he was ordered to film a masturbation scene for the groundbreaking series.

According to the new book “Tinderbox: HBO’s Ruthless Pursuit of New Frontiers,” the show’s writers penned a scene in which Gandolfini’s character, Tony Soprano, pleasured himself in a gas station bathroom.

Gandolfini — who once claimed he showered after filming scenes for “The Sopranos” because he felt “dirty” — was said to be vehemently opposed to including the randy moment, which was written in partway through the sixth season.

JAMES GANDOLFINI’S SON MICHAEL REVEALS DIFFERENCES BETWEEN THEIR VERSIONS OF ICONIC ‘SOPRANOS’ CHARACTER

Jame Gandolfini (R) won three Emmy awards for playing Tony Soprano in the HBO crime drama. 

Jame Gandolfini (R) won three Emmy awards for playing Tony Soprano in the HBO crime drama.  (HBO)

However, he relented and filmed the frisky scene, before it was later cut from the final version of the episode.

“Tinderbox: HBO’s Ruthless Pursuit of New Frontiers” claims that Gandolfini often objected to many character choices on the set of “The Sopranos.”

“There were … fitful bouts of disruptive incredulousness as he reacted to certain scripts he was handed,” the book’s author, James Andrew Miller, wrote in an excerpt published in New York magazine.

“Gandolfini … would sometimes balk at a particular scene and instead of asking [showrunner David] Chase, ‘Do I have to do this?’ he would wonder out loud, ‘What the f–k is this?’ and then declare flatly, ‘I’m not doing it.'”

Actor James Gandolfini (R) and actress Edie Falco pose on site for the filming of the final episode of "The Sopranos" March 22, 2007 in Bloomfield, New Jersey.

Actor James Gandolfini (R) and actress Edie Falco pose on site for the filming of the final episode of “The Sopranos” March 22, 2007 in Bloomfield, New Jersey. (Photo by Arnaldo Magnani/Getty Images)

The claims come after Gandolfini’s co-star Edie Falco spoke out about her years filming “The Sopranos” in an interview with The New Yorker earlier this week.

MICHAEL GANDOLFINI SAYS PLAYING LATE FATHER’S CHARACTER TONY SOPRANO WAS ‘TOUGHEST DECISION EVER’

Falco, 58, described Gandolfini — who played her on-screen husband — as her “acting soulmate.”

“I don’t know how to explain this. We were just really regular middle-class, suburban kids that were never supposed to become famous actors,” the Emmy winner said.

“My interpretation is that the whole time, he was, like, ‘What the hell is going on?’” she continued. “I remember, when we got picked up for the second season, he said to me, ‘Yeah, well, I just have no idea what the hell we did, but we’ve got to try to do it again.’ And I said, ‘I hear you. I don’t know. We’ll figure something out.’”

American actor James Gandolfini, as Tony Soprano, smokes a cigar while he stands in pool, in publicity still for the HBO cable TV series 'The Sopranos,' 1999.   

American actor James Gandolfini, as Tony Soprano, smokes a cigar while he stands in pool, in publicity still for the HBO cable TV series ‘The Sopranos,’ 1999.    (Photo by Anthony Neste/Getty Images)

CLICK HERE TO SIGN UP FOR OUR ENTERTAINMENT NEWSLETTER

The “Nurse Jackie” star added: “He was totally un-actor-y, and was incredibly self-deprecating, and he was a real soulmate in that regard.

CLICK HERE TO GET THE FOX NEWS APP

“We did not spend a lot of time talking about the scripts,” Falco revealed. “It was like when you see two kids playing in the sandbox, completely immersed in their imaginary world. That’s what it felt like.”

Source: www.foxnews.com