A Texas judge ordered a 20-year-old man to marry his 19-year-old girlfriend, write down Bible verses, and attend counseling during a sentencing hearing for hitting another man in the jaw.

Josten Bundy said that he got into a physical confrontation with the ex-partner of his girlfriend, Elizabeth Jaynes, last February. He admitted to hitting the man twice for disrespecting his girlfriend, and the man pressed charges.

"[The ex-boyfriend] had been saying disrespectful things about Elizabeth, so I challenged him to a fight," said Bundy to local television station KLTV.

"I took matters into my own hands and I know that's wrong. I know I was raised better, but it happened," Bundy added.

Last month, Judge Randall Rogers asked Bundy while in court if he was married to Jaynes and then said, "You know, as a part of my probation, you're going to have to marry her...within 30 days."

If Bundy declined to do the probation, he would be forced to serve 15 days behind bars.

"He offered me fifteen days in jail and that would have been fine and I asked if I could call my job [to let them know]," said Bundy. "The judge told me 'nope, that's not how this works.'"

In fear that Bundy would lose his job, he and Jaynes quickly 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," said Jaynes. "It was just going to be kind of pieced together, I didn't even have a white dress."

According to constitutional lawyer Blake Bailey, a judge is not allowed to order a couple to get married.

"To say you're not going to be criminally punished if you get married is way out of left field," said Bailey. "It sounds like the old days of shotgun weddings, but not even the judge is capable of enforcing, what he thinks is best for some people in his court." 

Bailey added that the sentence would have likely been overturned in an appeals court.