A man convicted of having sex on a public beach in Florida in front of a child has been jailed for 2½ years in prison, a state prosecutor says.

Jose Caballero, 40, was found guilty of having sex on a public beach in broad daylight with Elissa Alvarez, 21, on July 20, 2014. Nearby witnesses caught the two on video, with Alvarez moving on top of Caballero in a sexual manner, and testified that a 3-year-old girl saw the act. Both were convicted on two counts of lewd and lascivious exhibition.

"Our office had discretion, and we felt that 2½ years was something that not only held him accountable but also reflected his past history as well," said Anthony Dafonseca, assistant state attorney.

Alvarez was sentenced to time served in May, but Dafonseca said prosecutors sought more time for Caballero due to his previous conviction and eight years in prison for cocaine trafficking. Originally, the prosecution filed paperwork to seek the maximum 15 years in prison for Caballero, but dropped that move soon after the guilty verdict.

Ronald Kurpiers, defence attorney for Caballero, said he didn't try to lower the sentence because otherwise the prosecution could reinstate the 15-year sentence.

"Do I believe, personally, that 2½ years is something that he should have to do? The answer is no," Kurpiers said, adding that he was grateful that the prosecution offered the same amount of prison time that it had in a plea deal before trial. "But I was caught between a rock and a hard place."

Caballero and Alvarez have to register as sex offenders. That means neither will be allowed to reside within 300 metres of a school, child care facility, park or playground and have to register with the Florida Department of Law Enforcement. They must register with a sheriff's office within 48 hours every time they change their residences, vehicles, email addresses or Internet identifiers, according to state law.

Kurpiers called making them register as sex offenders "horrifically unfair".

"I don't believe that his sex offender registration is applicable with what he's convicted of," Kurpiers said.

Kurpiers said he plans to appeal the case, including the sex offender registration, and Caballero was granted indigent status for the appeal in court. Alvarez filed an appeal in her case in June.

Alvarez was in the courtroom on Monday (local time), and she and Caballero are still a couple, Kurpiers said. Alvarez declined to comment.

The Florida Department of Corrections estimated that the cost of imprisoning each inmate per day in fiscal year 2013-14 was US$49.49 (NZ$74.14), so Caballero's prison time will cost about US$45,160 (NZ$67,650). He will not have to serve probation after his prison time and gets credit for time served since he was found guilty on May 4.

Caballero also made a request in court to stay in a prison close to Manatee County in order to be closer to his ill father, who uses a wheelchair and has suffered a stroke, Kurpiers said. Judge Gilbert Smith said that was a request to make to the Florida Department of Corrections.