The court committing a child to the Department of Corrections under this chapter and chapters 26-8B and 26-8C may, at any time after making the commitment and as long as the child is under the jurisdiction of the department, upon proper application and noticed hearing, order the discharge of the child from the department, order the child to be restored to the child's parents, guardian, or custodian or order the child to be placed under the guardianship of another person appointed by the court and placed in a suitable family home. At the hearing the court shall determine if the best interests of the child will be promoted by the child's discharge from the department.
The secretary of corrections may appear at the hearing and resist the application. The court shall give the secretary ten days advance notice of the application and hearing. The secretary shall have five days after receipt of the notice to inform the court if the secretary will appear and resist the application.
SDCL 26-7A-122