A Pennsylvania groom-to-be sexually assaulted one of his fiancée’s bridesmaids while she was black-out drunk — just two days before the planned ceremony, state police said.

Daniel J. Carney, 28, allegedly attacked the bridesmaid at a Poconos hotel on Aug. 30, then asked her to “be as happy as possible” for the sake of the bride in a text message sent on his wedding day, according to a criminal complaint obtained by the Pittsburgh Post-Gazette.

The 29-year-old woman from Oregon was in town for Carney’s Sept. 1 wedding, and spent the day of the alleged assault drinking and rafting on the Delaware River with other members of the wedding party.

The group arrived back at the Shawnee Inn around 8 p.m. By that time, the bridesmaid was highly intoxicated and unable to stand on her own.

So the bride asked Carney to help out her inebriated friend. But instead, he attacked her, the complaint states.

Surveillance footage shows him pulling the unsteady woman to the hotel’s men’s locker room, where he assaulted her, cops said.

When the bridesmaid came to, she said, Carney was biting her hard and grabbing her. She blacked out again and said she woke up to find him on top of her with her bikini bottoms pulled off.

At one point, she remembered, the bride-to-be walked in and screamed at Carney. Another bridesmaid then helped her out of the locker room.

The next day was “chaos amongst the entire wedding party,” she told cops, with Carney initially claiming that the bridesmaid initiated the locker room encounter.

That morning, he called to apologize, according to the complaint. But she told him she felt extremely violated and upset.

The day of the wedding, Carney texted and apologized again, asking “can we just be as happy as possible” for the bride, the complaint states.

He also asked her to take an emergency day-after contraceptive pill, cops said.

Police listened to a call between Carney and the victim, during which he denied they had sex, but admitted sexually assaulting her and apologized, the complaint states.

During an interview with troopers, Carney first claimed he was drunk and “felt like he was taken advantage of by the victim” — and then changed his story to admit he’d grabbed her arm and pulled her into the locker room, cops said.

A friend of Carney’s told CNN the couple went through with the wedding.

Carney was charged Friday with involuntary deviate sexual intercourse and assault.