A Lantana man accused of trying to lure a middle-school-aged girl into prostitution wants out of a plea deal that would send him to prison for 20 years, court records show.

Joel Bautista Trinidad’s conviction would have been Palm Beach County’s first this year for human trafficking, court records show. The 34-year-old man pleaded guilty in October to charges of human trafficking, kidnapping, lewd or lascivious battery and lewd or lascivious molestation.

Read The Post’s coverage of human trafficking in Palm Beach County

A motion filed last week before Judge Charles E. Burton demands the case instead be tried before a jury. A date for Burton to rule on the motion has not been determined.

The motion, filed by Miami-based attorney Raul C. Recoba, says Trinidad’s plea was involuntary because his attorney provided insufficient counsel. It says that attorney advised him to accept the state’s plea offer without conducting an independent investigation. Court records show that Trinidad was represented at that time by the public defender’s office, but has since hired Recoba.

Recoba said Thursday that he could not comment on any aspect of the case without first consulting with his client. State Attorney’s Office spokesman Mike Edmondson said he also could not speak about the matter.

Court records show that Trinidad’s plea agreement resulted in concurrent sentences of 20 years in prison and 10 years of probation. He was arrested in May after authorities alleged he used the social-media application Tango to solicit a middle-school student and encouraged her to recruit her friends into prostitution.

State attorney credits task force with rise in human-traffickign arrests

Authorities say Trindad at one point asked the girl to run away with him to be his wife. He allegedly spoke to the girl about becoming a "plug," a term used by sex traffickers to refer to a person who recruits other victims for prostitution.

Trinidad, who is a citizen of Mexico, faces deportation after his legal proceedings have concluded.

He is one of at least 10 men in Palm Beach County arrested since January on human-trafficking charges. In January, the county formed a task force, led by State Attorney Dave Aronberg, aimed at targeting human trafficking, which involves using some form of fraud, force or coercion to exploit another person for personal gain.

Behind closed doors: Hotels, motels emerge as human-trafficking sites

One other person arrested in Palm Beach County this year has been convicted of federal trafficking charges. Last month, Marco Orrego of suburban Boynton Beach was convicted on one federal charge of sex trafficking involving a minor. At the state level, he was convicted on three counts of unlawful sexual activity with a minor after the state chose not to proceed with its own trafficking charges. Orrego is serving concurrent state and federal sentences of 20 years.