(a) No person who stands convicted of an offense under the laws of the Virgin Islands shall be sentenced to increased punishment by reason of one or more previous convictions, unless prior to sentencing, the United States Attorney or the Attorney General of the Virgin Islands, as the case may be, files an information with the Clerk of the Court and serves a copy of such information on the person or counsel for the person, stating in writing the previous convictions to be relied upon. Upon a showing by the Government that facts regarding previous convictions could not with due diligence be obtained prior to sentencing, the court may postpone the sentencing for a reasonable period for the purpose of obtaining such facts. Clerical mistakes in the information may be amended at any time prior to the pronouncement of sentence.
(b) If the prosecutor files an information under this section, the court shall, after conviction but before pronouncement of sentence, inquire of the person with respect to whom the information was filed whether he affirms or denies that he has been previously convicted as alleged in the information, and shall inform him that any challenge to a previous conviction which is not made before sentence is imposed may not thereafter be raised to attack the sentence.
(c)
(1) If the person denies any allegation of the information of previous conviction, or claims that any conviction alleged is invalid, he shall file a written response to the information. A copy of the response shall be served upon the prosecutor. The court shall hold a hearing to determine any issues raised by the response which would except the person from increased punishment. The failure of the Government to include in the information the complete criminal record of the person or any facts in addition to the convictions to be relied upon shall not constitute grounds for invalidating the notice given in the information required by subsection (a). The hearing shall be before the court without a jury and either party may introduce evidence. Except as otherwise provided in paragraph (2) of this subsection, the prosecuting authority shall have the burden of proof beyond a reasonable doubt on any issue of fact. At the request of either party, the court shall enter findings of fact and conclusions of law.
(2) A person claiming that a conviction alleged in the information was obtained in violation of the Constitution of the United States shall set forth his claim, and the factual basis therefor, with particularity in his response to the information. The person shall have the burden of proof by a preponderance of the evidence on any issue of fact raised by the response. Any challenge to a previous conviction, not raised by response to the information before an increased sentence is imposed in reliance thereon shall be waived unless good cause be shown for failure to make a timely challenge.
(d)
(1) If the person files no response to the information, or if the court determines, after hearing, that the person is subject to increased punishment by reason of previous convictions, the court shall proceed to impose sentence upon him as provided by law.
(2) If the court determines that the person has not been convicted as alleged in the information, that a conviction alleged in the information is invalid, or that the person is otherwise not subject to an increased sentence as a matter of law, the court shall, at the request of the prosecutor, postpone sentence to allow an appeal from the determination. If no such request is made, the court shall impose sentence as provided by law. The person may appeal from an order postponing sentence as if sentence had been pronounced and a final judgment of conviction entered.
(e) Whenever an information has been filed under this section with respect to a person who stands convicted following a plea of guilty, the court shall allow the person to withdraw the plea upon a showing that, at the time the plea was entered, the person did not know that his previous convictions would subject him to increased punishment.