Follow CBSMIAMI.COM: Facebook | Twitter

DEERFIELD BEACH (CBSMiami) — A Deerfield Beach science teacher was sentenced on Thursday in connection to state charges for having a sexual relationship with a student.

READ MORE: Officials Worry Large Crowds Will Leave Mess Behind After Memorial Day Weekend

Eric Beasley stared intently at his former student in the courtroom. Thursday was the first time he’s seen her since his arrest last April when he was caught in the act – having sex with her in the back seat of his car.

“I just wanted to mention how very, very sorry I was for putting her through this,” he said while shackled and cuffed in the courtroom.

CLICK HERE To Watch Ted Scouten’s Report 

Beasley apologized to her after a judge handed down a 20-year sentence. It mirrors a federal sentence he got last week.

He entered a guilty plea in December, admitting he had a sexual relationship with the girl while she was a student and he was her teacher at Zion Lutheran Christian School in Deerfield Beach.

He admitted guilt because he did not want to make her go through a trial.

“My lawyers explained to me about the lengthy sentence and the deal,” he said. “I said do whatever is necessary.  I cannot put her through that.”

READ MORE: Death Of Child Pulled From Homestead Pond Under Investigation

Being comforted by her mom, the girl sobbed after sentencing.

Beasley’s attorney said the teacher was an immature 25 year old who was in love with the girl.

“He’s been called a wandering romantic,” said his attorney Mike Gelety. “He’s looking for connections with people, he’s looking for relationships and he found one, which was a legitimate and deep seeded relationship with this girl.”

Despite those feelings, Beasley’s attorney said that’s no excuse for him crossing the line.

“That doesn’t justify him doing this with his student,” Gelety said. “It doesn’t justify doing this with somebody young.”

“He was in love with her?” asked CBS4’s Ted Scouten.

“Absolutely,” said Gelety. “And probably still is.”

After that 20-year sentence, Beasley will be on probation for the rest of his life and will be labeled a sexual predator.

MORE NEWS: Florida Law Enforcement Officials Reassure Parents On Potential School Shooter Threat

One other condition, he is never allowed to contact the victim again.

Ted Scouten