This appeal is by the defendant below from an order revoking probation and the sentence then imposed. The previous conviction, upon which adjudication of guilt had been withheld and probation granted, was for unlawful carnal intercourse with an unmarried female minor of previous chaste character.
Upon revoking probation the court adjudicated the defendant guilty of the above mentioned crime and sentenced him to imprisonment in the State Penitentiary for a term of 15 years, with credit for certain jail time served. The sentence then made the following provision:
“It Is Further Ordered that at the completion of said sentence you be evaluated by the Division of Mental Health for determination as a Mentally Disordered Sex Offender, pursuant to Section 917 of the Florida Statutes.
“It Is Further Ordered that you shall not be released until it is determined that you are able to remain in Society without causing harm.”
Chapter 917, Florida Statutes (1975) for determination of whether a person is a Mentally Disordered Sex Offender provides for procedure thereunder to be taken prior to sentencing, upon deferring sentence. It was error to provide for it to occur after expiration of a sentence of imprisonment which was imposed. Section 917.14, Florida Statutes (1975) provides:
“(1) If a defendant has been convicted of or has pleaded guilty or no contest to an offense or attempted offense in a current prosecution, the court may defer sentencing and certify him for a hearing and examination in the circuit court to determine whether he is a mentally disordered sex offender.
“(2) The court may certify a defendant under subsection (1) on its own motion, on motion by the State Attorney or the defendant, or on application by affidavit of the defendant.’-’
Accordingly, the judgment is affirmed, but the sentence is vacated and the cause is remanded to the Circuit Court to either *921resentence the defendant or defer sentence and certify the defendant for hearing under the said mentally disordered sex offender act.
It is so ordered.