A Florida man convicted of having sex on a public beach has been sentenced to two-and-a-half years in prison, according to a state prosecutor.

Jose Caballero earlier this year was convicted of having sex on Bradenton Beach, on Florida's gulf side, in plain sight of a 4-year-old child, the Associated Press reported.

Caballero reportedly was fondling a woman before he started having sex with her, all while a bystander was recording the romp. A still image from the video is below.

The child's mother asked Caballero and the woman to stop, but he became confrontational, something the judge said factored into the sentence.

Caballero previously served an eight-year prison sentence for cocaine trafficking.

The woman convicted of having sex with Caballero on the Florida beach, Elissa Alvarez, was released on time served.

Both were found guilty of lewd or lascivious exhibition in front of a child, a second-degree felony. Both must register as sex offenders.