
261 N.W.2d 356 (1977)
STATE of Minnesota, Respondent,
v.
Gerald Allen NESGODA, Appellant.
No. 47367.
Supreme Court of Minnesota.
December 16, 1977.
C. Paul Jones, Public Defender, Robert Oliphant, Asst. Public Defender, Minneapolis, for appellant.
Warren Spannaus, Atty. Gen., St. Paul, Bruce L. Anderson, County Atty., Two Harbors, for respondent.
Considered and decided by the court without oral argument.
PER CURIAM.
Defendant was found guilty by a district court jury of a charge of attempted felony burglary, Minn.St. 609.58, subd. 2(3), and 609.17, subd. 1, and was sentenced by the trial court to a fine of $1,500 and a term of 2½ years in prison with execution stayed and defendant placed on probation. On this appeal from judgment of conviction defendant contends primarily that his conviction should be reversed because the trial court erroneously refused to submit the lesser-included offense of attempted misdemeanor burglary. We affirm.
Under § 609.58, subd. 2(3), one who enters a building without consent with intent to steal or to commit a felony or gross misdemeanor commits a felony, whereas one who does the same act with intent to commit a misdemeanor commits a gross misdemeanor. While attempted misdemeanor burglary is clearly a lesser-included offense of attempted felony burglary, § 609.04, it does not follow that the trial court was required to submit the lesser offense. As we held in State v. Leinweber, 303 Minn. 414, 228 N.W.2d 120 (1975), the test which must be applied in determining whether to submit a lesser-included offense is whether there is evidence which produces a rational basis for a verdict acquitting defendant of the offense charged and convicting *357 him of the lesser offense.[1] Under this test "[t]he lesser-included offense charge is not required simply because the jury could exercise its power of acquitting on the greater charge for no reason at all `in the teeth of both the law and facts,' * * *." United States v. Markis, 352 F.2d 860, 867 (2 Cir. 1965), vacated on other grounds, 387 U.S. 425, 87 S.Ct. 1709, 18 L.Ed.2d 864 (1965). Rather, there must be a rational basis in the evidence justifying submission of the lesser-included offense.
In this case the sole witness at trial was the owner of the cabin defendant was charged with attempting to enter. He testified that on November 8, 1975, he caught defendant and a hunting companion trying to enter the cabin by breaking the lock on the door with a concrete block taken from an unlocked shed next to the cabin. He testified that, after giving a different explanation for his actions, defendant admitted that he had been trying to get in, saying that he and his friend were lost and wanted a place to spend the night. Since it was only 3 p. m. and the weather was balmy (sunny and in the 50's) and since defendant had a geographical map of the area in his possession, the owner discounted this story and decided to press charges.
In his brief on appeal defendant argues that the jury rationally could have found that he was trying to enter the cabin not to commit a felony or gross misdemeanor or to steal anything, but simply to spend the nightthat is, to commit misdemeanor trespass under § 609.605(6), which provides that one commits trespass who "occupies or enters the dwelling of another, without claim of right or consent * * * except in an emergency situation."
However, we need not decide this point because, as the state points out in its brief, § 609.605(6) was not enacted until the 1976 session of the legislature and has no application to this case. Under § 609.605, as it read when defendant committed the acts constituting the basis of the charge, defendant could not have been convicted of trespass for entering the cabin unless he had refused to leave after being asked to leave by the owner or the lawful possessor.
Admitting in his reply brief that the trespass statute on which he relies was not enacted until after he had committed the attempt, defendant changes his approach and argues that the jury reasonably could have inferred that defendant intended to commit vandalism or some other misdemeanor once he was inside.
We believe that in order to find defendant attempted to enter the cabin to commit an act of vandalism or some other misdemeanor, the jury would have had to not only reject the strong evidence of defendant's guilt of the crime charged, but would have had to reject the statement defendant made to owner as to why he tried to enter the cabin. Taking into account all the evidence, we hold that the trial court was correct in concluding that the jury rationally could not have acquitted defendant of attempted felony burglary and yet convicted him of attempted misdemeanor burglary. Accordingly, it did not abuse its discretion in refusing to submit the lesser-included offense.
Affirmed.
NOTES
[1]  Recent cases illustrating the application of this test include State v. McDonald, Minn., 251 N.W.2d 705 (1977), and State v. Malzac, Minn., 244 N.W.2d 258 (1976).
