TULSA, Oklahoma - A Tulsa man stopped his rape trial and pleaded guilty instead of taking his chances with a jury.

Mason Dailey, 23, was charged with rape, attempted rape, lewd molestation and indecent exposure. Dailey pleaded guilty to all four counts on Thursday right after his rape victim testified.

The rape victim was his girlfriend's mother. She testified that in September 2016, she and Dailey went grocery shopping and to the liquor store while her daughter was at work.

She said after returning home, she started cooking dinner when Dailey offered her a shot of flavored vodka. She said they took "two or three" shots together, but after the second shot, she started feeling bad.

Eventually, the woman said she blacked out, and woke up on the couch several hours later. She said she felt sore and had a distinct feeling that Dailey had raped her.

The woman repeatedly said Dailey was "like a son-in-law," because he'd been dating her daughter for so long.

She didn't confront her daughter or Dailey about the rape until a couple months later because she said she was afraid it would cause a rift in her family.

The woman said she when she did eventually tell her daughter, her daughter confronted Dailey.

Dailey then left the apartment he shared with the victim's daughter and drove to LaFortune Park, where he walked up to a police officer in his patrol car and confessed to the crime.

After Dailey gave his statement, police called the victim and she reported the crime.

After hearing this testimony, Dailey, his family and his attorneys asked for a break and stepped out of the courtroom.

An emotional Dailey and company re-entered the courtroom over an hour later ready to enter a plea.

"We're surprised," Assistant District Attorney Kenneth Elmore said. "It's pretty rare that someone in the middle of a jury trial wants to take some responsibility and plea, taking accountability for their actions. It's not something that happens very often."

Dailey was sentenced to 12 years in the Department of Corrections and will be required to serve 85 percent of his term before he's eligible for parole.

Dailey will also be required to register as a sex offender upon release.

"I think that it's a good deal," Elmore said. "That's why I agreed to it. What I personally think he may have deserved is sometimes different than what is a just outcome."

Elmore said this was a unique case, and although he can't guess exactly why Dailey decided to plea halfway through the trial, he said seeing the reaction from the jurors could have played a role.

Dailey's attorney David Slane later said he felt confident in their case but they weren't sure the jury would see things their way. He said taking the plea deal seemed like the smart move since Dailey is so young.