It could have been a funeral-home scene out of a “Sopranos” episode. At the wake for crime author Philip Carlo, Tony Danza angrily interrupted the priest, claiming he was talking too much about God and not enough about the best-selling biographer of mass murderers, including Richard Kuklinski and Richard Ramirez, during his eulogy.

A source at Thursday’s wake at Peter C. La Bella Funeral Home in Bensonhurst said the priest — “who said he was a substitute priest from a federal prison, which made some people smirk — started to ramble on and on about religion, quoting the Bible and making mourners uncomfortable.

“Tony, who was one of Carlo’s closest friends, walked right up to the priest and said angrily, ‘Excuse me, but this is not about you. It’s supposed to be about my friend, and if you can’t do that, maybe you should let someone else speak!’

“People were stunned, while the priest was visibly shaken. He tried talking about Carlo before quickly wrapping things up. Danza took over and eulogized Carlo with memories from their younger days.

“When someone then heckled Tony, he said, ‘Will you give me a break? Will you stop and let me talk?’ ”

Guests included Chuck Zito, John “Cha Cha” Ciarcia, Danny Aiello, Carlo’s family, Kuklinksi’s widow, Barbara, and movie producer Matty Beckerman. Close pal Mickey Rourke — who is starring in the movie adaptation of Carlo’s “The Ice Man: Confessions of a Mafia Contract Killer,” about Kuklinski — sent a 6-foot flower arrangement.

Danza spoke again Friday morning during the service at the chapel at Greenwood Cemetery, but this time, “he brought people to tears,” the source added.

Carlo died Nov. 8 at age 61.

His wife, Laura, told us, “The funeral went very well, and we know Phil would have been very happy. We all agreed that the priest had to go and leave it to Phil’s friends to come to the rescue.” Danza’s rep said he was unreachable and declined to comment.