MIAMI (CBS4) – A former Miami-Dade firefighter who had allegedly sent sexually explicit messages to  a 17-year-old boy will not face any jail time and instead will enter into a 12-month program to avoid a criminal record.

Ulises Rodriguez, 36, agreed to a lesser charge of child abuse no great harm and, if he successfully completes the program, which includes entering into a mentally disordered sex offender program, the charge will be dismissed, both prosecutor and defense attorneys said in court Wednesday.

READ MORE: Honda Issues Recall Over Hood Issue

It’s a resolution that the state said the victim’s father was also in agreement with.

The alleged relationship came to light when the boy died and someone discovered sexually explicit text messages and pictures on the teen’s cell phone, according to police.

According to Rodriguez’s arrest affidavit, the first sexually explicit messages and graphic pictures were sent to the teen’s phone on May 1, 2011. The last messages allegedly from Rodriguez were sent to the teen two days before the teen died at the end of June. The medical examiner has not yet determined the teen’s cause of death, but police say it does not appear to be related to the alleged relationship with Rodriguez.

READ MORE: Two Lots Of COVID Drug Remdesivir Part Of Safety Recall For Glass Particle Contamination

Rodriguez had originally been charged with 17 counts of Transmitting Harmful Material to a Minor.

His lawyer, Michael Mirer, said he hopes the case will be dismissed.

Mirer had argued that “the evidence I have seen does not establish that Mr. Rodriguez ever knew or had any knowledge the person he allegedly was communicating with was a minor.”

In the days following Rodriguez’s arrest, Miami-Dade Fire Rescue issued the following statement:

MORE NEWS: Dolphins Dominate Depleted Giants 20-9 For 5th Straight Win

“Based on the arrest and ongoing criminal investigation, Firefighter Ulises Rodriguez has been relieved of duty. He was hired on July 18, 2005.”