No person indicted or charged by information or complaint of any crime shall be sentenced therefor, unless he has been legally convicted of the crime in a court having competent jurisdiction of the cause and of the person. No person shall be convicted of a crime unless found guilty by the verdict of the jury, accepted and recorded by the court; or upon the defendant's confession of guilt or a plea of nolo contendere, accepted and recorded in open court; or after trial to the court without jury and the finding by the court that such defendant is guilty of the crime for which he is charged.
NMS § 30-1-11