
153 N.W.2d 135 (1967)
STATE of Minnesota, Respondent,
v.
Roger Glen LaVALLA, Appellant.
No. 40378.
Supreme Court of Minnesota.
September 15, 1967.
*136 C. Paul Jones, Public Defender, Murray L. Galinson, Asst. Public Defender, Minneapolis, for appellant.
Douglas M. Head, Atty. Gen., Gerard W. Snell, Acting Sol. Gen., St. Paul, Wm. B. Randall, County Atty., Mentor Addicks, Thomas Quayle, Asst. County Attys., St. Paul, for respondent.

OPINION
MURPHY, Justice.
This case is before us on appeal from a judgment of conviction for the offense of burglary in violation of Minn.St. 609.58. On arraignment, defendant entered a plea of not guilty. Later, on November 1, 1965, he appeared with counsel and changed his plea to guilty. Defendant asks for a reversal, asserting that the plea was not intelligently and understandingly entered and that the trial court, in accepting the plea, did not address himself to defendant to inquire if defendant understood the nature of the charge. He argues, "The court conducted no examination of the Appellant whatsoever before accepting his plea of guilty. If the court had conducted the proper examination as required by the recent decisions of this Court," it would have become apparent that defendant never committed the crime and that, if the trial court had taken the trouble to inquire of defendant with reference to the elements of the alleged offense, he "would then have been required to refuse to accept Appellant's plea of guilty."
The indictment charges that on September 22, 1965, defendant unlawfully entered the dwelling of one Robert James Blossom with the intent "to commit therein the crime of assault, and he [the defendant], did while in the dwelling commit an assault upon Robert James Blossom, a person then and there present in the dwelling." The offense of burglary is defined by § 609.58.[1]*137 This statute, which is part of the Criminal Code of 1963, makes burglary subject to varying punishments, depending on the circumstances under which it was committed. Under subd. 2(1) (b) it is a felony punishable by imprisonment for not more than 20 years or a fine of not more than $20,000, or both; under subd. 2(3) it may, dependent upon intent, be punishable by imprisonment for not more than 5 years or a fine of not more than $5,000, or both, or it may be punishable by imprisonment for not more than 1 year or a fine of not more than $1,000, or both. Section 609.02, subd. 4, when read in conjunction with the definitions of "felony" in § 609.02, subd. 2, and "misdemeanor" in § 609.02, subd. 3, defines a "gross misdemeanor" as a crime punishable by imprisonment for not more than 1 year or a fine of not more than $1,000, or both. Further, under the flexible penalty provisions contained in § 609.13, a conviction could be deemed to be for a gross misdemeanor or even a misdemeanor if it meets the requirements of the section, notwithstanding the felony character of the offense.
Prior to sentence there was some discussion between court and counsel as to whether the indictment alleged a felony or a gross misdemeanor. So far as the record indicates the elements of the offense were not discussed. There seemed to be an agreement that the indictment charged a gross misdemeanor. The trial court said:
"Well, the record may show if I were called upon to make a determination of that issue it appears to the Court that the charge contained in the indictment is a gross misdemeanor under Subdivision 3."
Defendant was sentenced on that basis to a period of 5 months, and allowance was made for the time defendant was in jail awaiting sentence. After defendant began serving the sentence he escaped, was apprehended, and was later sentenced for the offense of escape.
We agree with defendant on the basis of the record that the plea was not understandingly entered. Not only was there an absence of inquiry by which defendant might have been informed of the elements of the offense, but the indictment failed to properly inform defendant of the charge against him. The indictment overlooks the requirement of § 628.12 that it "shall be direct and certain as it regards: * * * The particular circumstances of the offense charged, when they are necessary to constitute a complete offense," and of § 628.10(2), which provides that the indictment shall contain "[a] statement of the acts constituting the offense, in ordinary and concise language, without repetition." One of the tests as to the sufficiency of an indictment, provided by § 628.18(7), is:
"That the act or omission charged as the offense is stated with such a degree of certainty as to enable the court to pronounce judgment, upon a conviction, according to the right of the case."
An indictment charging the crime of burglary which, under § 609.58, may be committed in various ways should describe the offense with sufficient certainty to enable the accused to plead a judgment of conviction of it in bar to another prosecution of the same offense. Obviously, the indictment in this case does not meet that requirement. No attempt is made in the indictment *138 to set forth the particular acts which define the kind of burglary defendant was charged with having committed. Section 609.585 provides:
"A prosecution for or conviction of the crime of burglary is not a bar to conviction of any other crime committed on entering or while in the building entered."
It follows from the foregoing statute that defendant might not be permitted to assert the defense of prior conviction in a subsequent prosecution for another crime relating to the unlawful acts charged.
It seems to us that the indictment is in fact insufficient in that it fails to properly inform defendant of the acts or circumstances constituting the offense with which he was charged. We pointed out in State v. Oman, 265 Minn. 277, 121 N.W.2d 616, that if the statute does not set forth all of the elements necessary to constitute the offense intended to be punished, an indictment which simply follows the words of the statute is not sufficient, and in such case the indictment must allege with certainty all of the particular facts necessary to bring the case within the intent and meaning of the statute.
Because of the insufficiency of the indictment, the doubt of the court and the attorneys as to the offense charged by it, and the failure of the court to satisfy himself that defendant understood the elements of the offense with which he was charged, we conclude that the whole proceedings were fatally defective. State v. Jones, 267 Minn. 421, 127 N.W.2d 153; A. B. A. Project on Minimum Standards for Criminal Justice, Standards Relating to Pleas of Guilty (tentative draft), § 1.4, p. 25.
We recognize that both the trial court and the respective counsel felt that, since the matter was being disposed of on the basis of a gross misdemeanor, there was no necessity for precautions beyond those which were taken. It may well be that the action we take on this matter may not work out to the best interests of defendant. A determination that it will, however, has been made in an argument of his counsel, public defender, which is characterized by great force and conviction. It seems to us that on the basis of the record the errors raised by defendant require that the sentence be vacated and the matter returned to the district court for further proceedings.
Reversed and remanded.
NOTES
[1]  So far as applicable here, Minn.St. 609.58, subd. 2, provides: "Whoever enters a building without the consent of the person in lawful possession, with intent to commit a crime therein, commits burglary and may be sentenced as follows:

"(1) To imprisonment for not more than 20 years or to payment of a fine of not more than $20,000, or both, if:
* * * * *
"(b) The building entered is a dwelling and he possesses a dangerous weapon when entering or while in the building or he commits an assault upon a person present therein; or
* * * * *
"(3) In any other case, to imprisonment for not more than five years or to payment of a fine of not more than $5,000, or both, if the intent is to steal or commit a felony or gross misdemeanor or to imprisonment for not more than one year or to payment of a fine of not more than $1,000, or both, if the intent is to commit a misdemeanor."
