It may have been a critical and commercial hit, but actor Mark Wahlberg says he's prayed to God for forgiveness for his role in the 1997 movie "Boogie Nights."

Standing next to Cardinal Blase Cupich on Friday night in Chicago, Wahlberg, a committed Catholic, told Chicago Inc., "I just always hope that God is a movie fan and also forgiving, because I've made some poor choices in my past."

Asked if he'd ever prayed for forgiveness for any movies in particular, he added, "'Boogie Nights' is up there at the top of the list."

Wahlberg — who famously portrayed porn star Dirk Diggler in that 1970s-set film — was in Chicago to support Cupich's effort to draw young people into the church.

He told Inc. that he believed his own troubled adolescence, which included time spent in prison for a racist assault on a Vietnamese immigrant, might make it easier for Chicago youths caught up in violent crime to relate to how he turned his life around with the church's help.

"I've never been shy about sharing my past and the bad decisions I've made and being affiliated with gangs, being incarcerated, so absolutely I think they can identify with me on a personal level, and that's why I've continued to try to do as much as I can to help young people," he said.

"It's one thing to give money, or to start programs, but to be there and be able to talk to them, and tell them there is someone who has been through the same things they are going through and was able to turn their life around, and turn it into a big positive. That's always important."

Wahlberg, who in 2015 enjoyed an audience with Pope Francis, has previously come out in support of gay marriage. But he said he had not discussed the issue with Cupich, who despite a more nuanced line than his predecessor, toes the church line that marriage is only between a man and a woman.

"I haven't spoken with the cardinal or the pope about that," Wahlberg said. "I just think we have a lot more important issues to be worrying about. For me, I've got my own issues to deal with. ... I go to confession and I want to continue to work hard on myself."

A crowd of more than 1,000 worshippers joined Wahlberg and Cupich at the UIC Pavillion later Friday.

Interviewed onstage between two ferns by Cupich (who, like Wahlberg, is one of nine siblings), Wahlberg told the audience he finds time to pray early every morning by going to bed at 7:30 pm at night. “This is way past my bedtime!” he said.

Being jailed as a teen, he added, was a “big wake-up call for me. A lot of people go to God when they get into trouble. When I heard the jail doors close behind me … I knew that was just the beginning for me.

“I feel remorse when I’ve made mistakes. If I could go back and change a lot of things that I did, I would. I look for ways to give back.”

And when an audience member asked him and Cupich how they learned to forgive themselves for their own mistakes, Wahlberg joked to Cupich, “I’ll take this one — I don’t think you’ve been locked up!”