Screen shot via KLTV

A Texas man was sentenced to marry his 19-year-old girlfriend, write down Bible verses and attend counseling by a judge as punishment for punching another man in the jaw, according to local television station KLTV.

The court case stemmed from a February altercation between Josten Bundy, 20, and the ex-partner of his girlfriend, Elizabeth Jaynes. He told the TV station he hit the man twice.

During his sentencing, Judge Randall Rogers told Bundy he would have to marry his girlfriend within 30 days as a condition of his probation. Bundy said that Rogers gave him the option to sit behind bars for 15 days.

Bundy asked if he could call his employers to tell them he was going to jail, but the judge declined. Bundy and Jaynes said they feared Bundy would lose his job, so they applied for their marriage license and scheduled a date with the justice of the peace.

“It just felt like we weren’t going to be able to have the wedding we wanted,” Jaynes told KLTV. “It was just going to be kind of pieced together, I didn’t even have a white dress.”

Attorney Blake Bailey told KLTV that forcing a couple to marry is illegal and that the sentence likely would have been struck down by a higher court.

Calls to Judge Rogers’ office were not returned late Friday.

Want more stories on faith? Follow Acts of Faith on Twitter or sign up for our newsletter.

Which presidential candidate leads among evangelicals? Right now, it’s Donald Trump.

How the Planned Parenthood videos set off a renewed wave of activism on abortion

Skipping church? Facial recognition software could be tracking you