The defendant appeals from a conviction under ORS 166.270. He was found to have been in possession of a concealable weapon, contrary to the limitations imposed by that statute upon former convicts.
The only issue is whether this defendant was, at the time of the alleged possession, a person who had been convicted of a felony within the meaning of ORS 166.270. The trial court held that the defendant was such a former convict.
In December of 1958, the defendant was tried, convicted, and sentenced to the penitentiary for violating ORS 164.830 (injury to property by explosives). This conviction was set aside in a post-conviction proceeding brought under ORS 138.510.
The state concedes that the 1958 conviction was set aside in the post-conviction proceeding, but now contends that the trial court which set aside the conviction misconceived its function under the post-conviction relief statutes, and that it erred in setting aside the conviction.
While the fact is now immaterial, it appears that the trial court was in error in setting aside the 1958 conviction. No basis for post-conviction relief was established in the post-conviction proceedings. This belated discovery by the state, however, cannot now *252restore the defendant to the status of a convict under the 1958 conviction. The state’s remedy for the erroneous setting aside of the 1958 conviction was by appeal. The state chose not to appeal, and the judgment, for better or for worse, became final.
We hold that the state may not, in this case, make a collateral attack upon a final judgment of a trial court which set aside a conviction. Whether or not the 1958 conviction should have been set aside, the judgment which set it aside is now res judicata. Since that judgment cannot be collaterally attacked, the defendant is entitled to have the 1958 conviction removed from his record.
The state argues that the post-conviction judgment technically did not declare the 1958 conviction void. This is true. The judgment merely ordered the prisoner discharged. Again, however, the state is seeking belatedly to remedy an error that should have been remedied when committed. The prisoner was, in fact, discharged. The only legal ground for his discharge under a post-conviction judgment was a judicial declaration that the conviction under which he was being held was void. Whether or not the post-conviction court used proper terminology in its judgment is irrelevant. The court erroneously ordered the warden to discharge a prisoner. The proper way to reach that error was by appeal. The failure to appeal forfeited the right of the state to question the judgment.
Reversed.