At least three months before the scheduled end of the secure surveillance period, the sentence enforcement judge, or failing this, the public prosecutor, will arrange for the medical examination to be carried out and may refer the matter to the multidisciplinary commission on security measures for an opinion. The sentence enforcement judge, or failing this the public prosecutor, will refer the matter to the regional court for secure detention at least one month before the expiry of the measure, together with its reasoned opinion.