Daniel Ruff was convicted, under former RCW 9.41.040(4), of unlawful possession of a short firearm. That statute made it a crime to possess a short firearm if one had been confined under the civil commitment statute, RCW 71.05.320, committed after an insanity acquittal pursuant to RCW 10.77, or convicted of certain criminal offenses. Ruff contends that the version of the statute under which he was convicted is unconstitutional as applied to persons who were committed pursuant to RCW 10.77. Ruff himself was committed for a time under that statute following a 1975 acquit*733tal, by reason of insanity, on a charge of taking a motor vehicle without permission.
In September of 1989, Ruff acquired a .22-caliber pistol. He was subsequently charged and convicted of unlawful possession of that weapon. After Ruff filed his notice of appeal, this court held former RCW 9.41.040(4) unconstitutional as applied to persons who have been committed pursuant to RCW 71.05.320. Morris v. Blaker, 118 Wn.2d 133, 821 P.2d 482 (1992). In his brief to the Court of Appeals,1 Ruff argued that the reasoning in Morris applies as well to persons who were committed under RCW 10.77. The Court of Appeals held that Ruff had not demonstrated the necessary standing to challenge RCW 9.41.040(4) because he had not applied for a gun permit or sought a declaration regarding the applicability of the statute to him. The court therefore declined to reach the constitutional issue, and affirmed Ruff's conviction.
Ruff petitions for review by this court. We grant review and reverse the Court of Appeals.
The Court of Appeals is correct that Morris presented the constitutional issue in a different procedural context. The plaintiff there applied for a permit to carry a concealed weapon. That application was denied based on RCW 9.41-.070, which precludes issuance of a concealed weapons permit to any person who is barred by RCW 9.41.040 from possessing such a weapon. The plaintiff then appealed, arguing in part that former RCW 9.41.040 violated the equal protection clause because it allowed felons to regain their right to possess firearms by obtaining a pardon, certificate of rehabilitation, or the like, but gave no similar opportunity to persons committed under mental health statutes. We agreed. Morris v. Blaker, supra at 147-49. To comport with equal protection principles, we held, the statute must provide "former mental patients with an opportunity to prove that *734the reason for the restriction on their right to carry weapons no longer exists." Morris, at 149.2
The Court of Appeals erred in holding that Ruff lacks standing because he failed to apply for a permit or seek a declaratory judgment. Permits are required in this state to carry concealed weapons, see RCW 9.41.050-.070, but not simply to own or possess pistols. There was, therefore, no permit application procedure which Ruff should have employed to raise the issue prior to this criminal action. Although he could perhaps have brought a declaratory judgment action, we regularly consider constitutional challenges to criminal statutes in the prosecutions brought under them. See, e.g., State v. Coria, 120 Wn.2d 156, 839 P.2d 890 (1992) (challenge to school zone enhancement statute); Tacoma v. Luvene, 118 Wn.2d 826, 827 P.2d 1374 (1992) (challenge to drug loitering ordinance); Seattle v. Slack, 113 Wn.2d 850, 784 P.2d 494 (1989) (challenge to prostitution loitering ordinance). In short, having been prosecuted for violation of former RCW 9.41.040, Ruff has standing to challenge that statute.
The dispositive question, then, is whether our reasoning in Morris applies to persons previously committed under RCW 10.77. We agree with Ruff that it does. As we explained in Morris:
No rational basis exists for the act's distinction between those who are permanently restricted from obtaining a concealed weapons permit (former mental patients confined pursuant to RCW 71.05.320) and those who are given an opportunity to requalify for a permit (persons convicted of violent crimes). No plausible justification exists to explain why those who have been convicted of violent crimes should be deemed capable of *735rehabilitation, but those who were previously involuntarily committed for treatment of a mental disorder are not.
Morris v. Blaker, supra at 149. The same is true here. No rational basis exists for the statute's distinction between those who were permanently prohibited from possessing short firearms (persons who had been committed under RCW 10.77 following insanity acquittals) and those who were given an opportunity to regain that right (persons convicted of violent crimes). Significantly, the statute permanently disqualified persons committed under RCW 10.77 from possessing handguns regardless of the nature of the crime for which they were acquitted by reason of insanity. Here, for example, Ruff's insanity acquittal related to a nonviolent property crime (taking a motor vehicle without permission). No plausible justification exists to explain why the statute deemed him forever incapable of rehabilitation while a person convicted of murder, rape, or some other violent crime could regain the right to possess a handgun.
In conclusion, former RCW 9.41.040(4) is unconstitutional as applied to persons acquitted under RCW 10.77. Ruff's conviction is therefore reversed.
The unconstitutionality of the statute under which the defendant was convicted is a manifest error affecting a constitutional right and may, therefore, be raised initially on appeal. RAP 2.5(a)(3).
The statute was amended in 1992 to correct the problem we identified in Morris. The prohibition against firearm possession by persons committed under either RCW 71.05.320 or RCW 10.77 has been moved to RCW 9.41.040(6)(a), and RCW 9.41.040(6)(c) now directs the secretary of social and health services to develop rules which "provide for the immediate restoration of the right to possess a firearm upon a showing in a court of competent jurisdiction that a person no longer" requires treatment or medication for a condition related to the commitment.