Whenever it appears that there is a question as to the defendant's competency to proceed in a criminal case, any further proceeding in the cause shall be suspended until the issue is determined. Unless the case is dismissed upon motion of a party, when the question is raised in a court other than the district court or a metropolitan court, the proceeding shall be suspended and the cause transferred to the district court. If the question of a defendant's competency is raised in the metropolitan court and the court determines that the defendant is incompetent to proceed in a criminal case, the cause, if not dismissed upon motion of a party, shall be transferred to the district court.
NMS § 31-9-1