Subd. 1. Guilty Plea. Before the court accepts a plea of guilty to any misdemeanor or gross misdemeanor offense punishable upon conviction by incarceration, the plea agreement must be explained in open court. The defendant must then be questioned by the court or counsel as to whether the defendant:
Subd. 2. Factual Basis. After explaining the defendant’s rights, the judge, with the assistance of counsel, must question the defendant to determine a factual basis for all elements of the offense to which the defendant is pleading guilty.
Subd. 3. Guilty Plea at First Appearance. If the guilty plea is entered at the defendant’s first appearance in court, the statement as to the defendant’s rights required by Rule 5.01 may be combined with the questioning required above prior to entry of a guilty plea.
Minn. R. Crim. P. 15.02