Ray Rice is going for the Hail Mary.

The raging running back turned to Jesus for salvation after punching out his fiancée in a casino elevator — becoming a born-again Christian along with his battered better half.

Rice and Janay Palmer were both baptized in a Baltimore church about a month after the Valentine’s weekend attack, a family source told The Post. The two were married a short time later.

They have also undergone religious mentoring with other couples including NFL players and their wives, sources told TMZ.

The church has long been an important part of Rice’s family.

A month before the elevator incident, Rice’s mother, Janet, told the Post about the running back’s spiritual life. “He was destined to be here,” the doting mom said about Rice’s NFL career. My sister [Denise] says he was born with a purpose, and for a purpose, and that’s to do what he’s doing now — play ball. God has given him a gift.’’

Rice spent a lot of his youth in New Rochelle’s St. Paul Fire Baptized Holiness Church. His aunt Denise is now a pastor there and said she would speak to Rice weekly and pray for him before every game.

“Whatever happened that night is not the same guy that came here. It was a bad night. He and his wife were high-school sweethearts and they are very much in love,” said the family source. “He found God, and whatever happened that night was not him. That’s not the Ray that I know. That’s not the Ray that came to church here.

“He came to this church when he was a kid. He was always a good kid. He still has roots in the neighborhood, and whenever he’s in town to see his family he comes to the church.”

Rice also claims to have forsaken booze as part of his personal rehabilitation. He said that he and Janay were drunk during the horrendous elevator scene, sources told TMZ.

The Pro Bowler’s friends think he is a Jekyll-and-Hyde when he’s getting drunk, and his friends are well aware of his violent rages, the sources said.

The report said Rice still drinks wine.

Janay has chosen to publicly stand by her husband since the elevator footage was made public on Monday.

She attacked the media the next day on Instagram, fuming that its release made her feel like she was “mourning the death of my closest friend.”

“To make us relive a moment in our lives that we regret every day is a horrible thing,” she added.

Her stance has sparked a social-media backlash and generated a few less-than-forgiving comments from the born-again wife.

After one social-media critic accused her of staying with Rice for the money, she replied in a post that told her to “get a f–king life.”

Rice’s strong community ties didn’t stop New Rochelle High School from removing the running back’s NFL jersey from its gym and a placard honoring him from a hallway, according to the Journal News.

“When you put people up on a wall of fame, it’s an inspiration to the kids in the school,” Steve Young, the school’s athletic director, told the newspaper.

“It becomes a teachable moment for the kids, that when something like that happens, there’s a consequence.”

The move confused some students because the retired No. 5 jersey Rice wore while setting records at the school remained on the gym’s wall.

His alma mater, Rutgers University, has already cut ties with its former star player.