The district attorney, or the Attorney General in those cases which have been initiated by the Attorney General, may by leave of court file a dismissal of an indictment, information or complaint and the prosecution shall thereupon terminate. Such a dismissal may not be filed during the trial without the consent of the defendant.
NRS 178.554