#### STATE OF MONTANA, Plaintiff and Respondent, v. WILBUR ESKILL RYTKY, Defendant and Appellant.

No. 05-444.

Submitted on Briefs May 17, 2006.

Decided June 20, 2006.

2006 MT 134.

332 Mont. 364.

137 P.3d 530.

For Appellant: Mark R. Sullivan, Attorney at Law, Kalispell.

For Respondent: Hon. Mike McGrath, Attorney General; Joslyn M. Hunt, Assistant Attorney General, Helena; Edward J. Corrigan, Flathead County Attorney, Kalispell.

CHIEF JUSTICE GRAY

delivered the Opinion of the Court.

¶1 Wilbur Eskill Rytky (Rytky) appeals from the judgment entered *365by the Eleventh Judicial District Court, Flathead County, on his conviction and sentence for the felony offense of deviate sexual conduct. The issue raised by Rytky is whether the application of § 45-5-505, MCA, in this case violates his right to equal protection of the laws under the United States and Montana Constitutions. We conclude, however, that we first must determine whether that issue is properly before us. For the reasons discussed below, we conclude it is not and remand with instructions.

¶2 The dispositive issue is whether Rytky’s constitutional equal protection issue is properly before this Court.

BACKGROUND

¶3 On May 19, 2004, the State of Montana (State) filed an information charging Rytky with the offense of deviate sexual conduct, a felony, in violation of § 45-5-505, MCA, based on an incident which allegedly occurred between Rytky and a 16-year-old male. The State also filed its notice of intent to seek a persistent felony offender designation. Rytky pled not guilty and subsequently moved to dismiss the charge against him, asserting that the application of § 45-5-505, MCA, under the facts of this case violated his constitutional right to equal protection of the laws. The State filed a brief opposing the motion.

¶4 Prior to a ruling on the motion to dismiss, Rytky and the State entered into a written plea agreement whereby Rytky agreed to plead guilty to the charged offense. In exchange, the State agreed not to pursue the persistent felony offender designation and to recommend that the District Court sentence Rytky to a five-year term of imprisonment in the Montana State Prison (MSP). During the change of plea hearing, the parties modified the written plea agreement by agreeing that, if the District Court followed the five-year sentencing recommendation, Rytky waived his right to appeal. However, if the District Court refused to follow the plea agreement and sentenced Rytky to more than five years, Rytky reserved his right to appeal the constitutional equal protection issue.

¶5 The District Court accepted Rytky’s guilty plea to the charged offense, scheduled a sentencing hearing, and ordered the preparation of a presentence investigation report and a psychosexual evaluation. At the close of the sentencing hearing, the District Court sentenced Rytky to a 10-year term of incarceration in the MSP, ordered that he be ineligible for parole until he completed all phases of the MSP’s sexual offender treatment program and specified various conditions to *366be imposed should Rytky be paroled. The District Court entered judgment on the conviction and sentence. Rytky appeals, raising the equal protection issue.

DISCUSSION

¶6 *Is Rytky’s constitutional equal protection issue properly before this Court?*

¶7  It is well-established that, generally, a criminal defendant who enters a knowing and voluntary plea of guilty to an offense waives the right to appeal any nonjurisdictional defects and defenses which occurred prior to entry of the plea. *See, e.g., State v. Samples,*2005 MT 210, ¶ 11, 328 Mont. 242, ¶ 11, 119 P.3d 1191, ¶ 11 (citing *Ellenburg v. Chase,*2004 MT 66, ¶ 21, 320 Mont. 315, ¶ 21, 87 P.3d 473, ¶ 21). Notwithstanding this general waiver of the right to appeal, § 46-12-204(3), MCA, provides that

> [w]ith the approval of the court and the consent of the prosecutor, a defendant may enter a plea of guilty or nolo contendere, reserving the right, on appeal from the judgment, to review the adverse determination of any specified pretrial motion.

¶8  Here, Rytky filed a pretrial motion to dismiss the charged offense based on constitutional equal protection grounds. The District Court did not rule on the motion. Rather, Rytky and the State entered into a plea agreement, Rytky pled guilty and was sentenced, and the District Court entered judgment. Although Rytky and the State agreed-and the District Court implicitly approved-that Rytky reserved his right to appeal his conviction on the basis of his constitutional argument if he were sentenced to a term in excess of five years, the District Court did not adversely determine any specified pretrial motion. As a result, Rytky’s reservation of his right to appeal the constitutional issue does not meet the requirements of § 46-12-204(3), MCA. We conclude, therefore, that Rytky’s conditional plea of guilty is invalid since the State was not authorized to consent to it and the District Court was not authorized to approve it.

¶9 We observe that, had the District Court denied Rytky’s motion to dismiss and Rytky reserved his right to appeal the denial, we would have plenary review over the constitutional equal protection issue. *See, e.g., State v. Thaut,*2004 MT 359, ¶ 12, 324 Mont. 460, ¶ 12, 103 P.3d 1012, ¶ 12. In that regard, judicial economy might suggest that we address the issue raised by Rytky notwithstanding the lack of a ruling by the District Court. Indeed, this might be a valid argument in some circumstances. Here, however, the State consented to-and the District *367Court accepted — Rytky’s conditional guilty plea without legal authority. It is important to correct this situation, thereby hopefully preventing it from arising again.

¶10 Remanded with instructions that the District Court vacate the entry of Rytky’s guilty plea and sentence, and the judgment entered thereon, and for further proceedings consistent with this opinion.

JUSTICES NELSON, LEAPHART, COTTER and MORRIS concur.