SAN JUAN, UNITED STATES -- A former New Brunswick radio host accused of seeking sex from a minor in Puerto Rico has changed his plea to guilty.

Trevor Doyle appeared in Puerto Rico District Court Thursday and pleaded guilty to a charge of travel with intent to engage in illicit sexual conduct.

Doyle, 45, was arrested last April after allegedly trying to solicit sex from an FBI agent posing online as a teenaged girl.

He originally pleaded not guilty in May and has been in custody since his arrest. Sentencing is set for May 19.

Court documents say Doyle travelled from New Brunswick to San Juan for the purpose of having sex with someone he believed was a 14-year-old girl. Elsewhere the documents indicate the girl was 13.

The FBI said Doyle was one of two men arrested in separate operations in Isla Verde, Puerto Rico, by the bureau's San Juan child exploitation unit.

According to the government's version of facts filed with the court, on March 31, 2019, an FBI agent submitted a post on an internet messaging application that read "Just a girl in PR who is booooored."

It says someone with the username "in Carolina" began chatting with the agent who clearly stated she was a 13-year-old girl.

The document says "in Carolina" did not express any concern with the person's age and began a discussion of meeting at night to have the girl perform oral sex.

The conversation moved to a different online messaging application known as KiK, but the agent repeatedly stated "that 'she' was 13 years old."

It says the person -- who now used the username "rogerssteve417" -- offered to pay for a taxi to take the girl to a beach to meet him and asked her to delete their messages from her phone.

"Do your parents check your phone?" he asked, and then instructed the girl how to clear her cache and history.

Doyle was arrested on the beach at the site of the arranged meeting.

The maximum penalty is 30 years in prison, but according to a plea agreement filed Thursday, the District Attorney and the defence have made recommendations on sentencing.

"In exchange for the defendant pleading guilty to Count One of the information, both parties agree the defendant may recommend a sentence of 70 months of imprisonment while the United States reserves the right to recommend a sentence of 87 months of imprisonment," the document states.

"Defendant knowingly and voluntarily agrees that, if the imprisonment sentence imposed by the Court is 87 months or less, the defendant waives the right to appeal any aspect of this case's judgement and sentence."

Doyle hosted the morning show on Capital FM in Fredericton, but was suspended after his arrest and is no longer employed by the company.

BellMedia operates Capital FM, as well as CTV News.

This report by The Canadian Press was first published Feb. 13, 2020.

-- By Kevin Bissett in Fredericton.