In the case of the conviction in any circuit court of any person for any criminal offense which indicates sexual abnormality, the trial judge may on his own initiative, or shall upon application of the attorney for the Commonwealth, the defendant, or counsel for defendant or other person acting for the defendant, defer sentence until the report of a mental examination conducted as provided in § 19.2-301 of the defendant can be secured to guide the judge in determining what disposition shall be made of the defendant.
Va. Code § 19.2-300