
541 P.2d 811 (1975)
STATE of Oregon ex rel. Mike Dillavou, Plaintiff-Relator,
v.
The Honorable Charles H. FOSTER, Judge of the Circuit Court of the State of Oregon for the Fourteenth Judicial District, Defendant.
Supreme Court of Oregon, In Banc[*].
Submitted on August 19, 1975.
Decided October 16, 1975.
Smith & Lee, Klamath Falls, for plaintiff.
Submitted on Defendant's Demurrer to Alternative Writ of Mandamus August 19, 1975.
O'CONNELL, Chief Justice.
Petitioner, in an original proceeding in this court, seeks a writ of mandamus requiring respondent circuit judge to release him from the Lake County jail.[1] We issued an alternative writ of mandamus, directing respondent to either release petitioner or show cause for not doing so. Respondent demurred to the writ. We ordered the sheriff of Lake County to release petitioner pending our final determination of the issue raised by the demurrer to the writ.
Petitioner was convicted of criminal activity in drugs. Judge Foster, respondent in the present proceeding, entered a judgment of conviction on April 15, 1975, directing that the imposition of sentence be suspended and that petitioner be placed on probation for five years. One of the conditions of probation was that petitioner remain incarcerated for 180 days in the county jail. The order also provided that petitioner would remain in custody in the event of an appeal.
Petitioner filed an appeal in the Court of Appeals, seeking to overturn his conviction, whereupon Judge Foster ordered the *812 county sheriff to retain petitioner in custody pending the outcome of the appeal. The merits of petitioner's appeal from the underlying conviction are not before the Supreme Court at this time; that matter is still pending in the Court of Appeals. At the time petitioner instituted the mandamus proceeding he had served 183 days counting "good time." The case now before this court concerns only the mandamus proceeding in which petitioner challenges his confinement during appeal.
Judge Foster based his order of confinement on the theory that a trial judge has the discretion to retain a defendant in custody during the appeal process without giving him credit for time served during that period.[2]
In support of this demurrer to the alternative writ of mandamus, respondent relies upon two statutes which, he contends, provide in effect that probation given after suspension of imposition of sentence may be stayed during an appeal from the conviction. These two statutes provide as follows:
ORS 138.135(1). "A sentence of confinement shall be stayed if an appeal is taken and the defendant elects not to commence service of the sentence or is admitted to bail. If a defendant is not admitted to bail and elects not to commence service of the sentence pending appeal, he shall be held in custody at the institution designated in the judgment without execution of sentence, except as provided in ORS 138.145."
ORS 135.285(2). "After judgment of conviction in municipal, justice or district court, the court shall order the original release agreement, and if applicable, the security, to stand pending appeal, or deny, increase or reduce the release agreement and the security. If a defendant appeals after judgment of conviction in circuit court for any crime other than murder or treason, release shall be discretionary."
It will be noted that ORS 138.135(1) gives an appealing defendant who is not released on bail the option of beginning service of his sentence and receiving credit for time served pending appeal. However, respondent interprets this section as applicable only to situations where the defendant has been sentenced, and contends that it is not applicable where imposition of sentence is suspended. Concluding that ORS 138.135(1) is inapplicable, respondent turns to ORS 135.285(2), which he interprets as giving the trial judge the discretion to release or hold an accused who takes an appeal.
Respondent correctly interprets ORS 138.135(1) as inapplicable to this case, but that does not end the inquiry. It is true that petitioner has not been sentenced. Imposition of sentence was suspended and, although a probation condition requiring six months in the county jail might resemble a sentence, the statutory scheme clearly distinguishes between sentencing and ordering probation after imposition of sentence.[3] Because he was not sentenced, petitioner does not have the option granted by ORS 138.135 (1) of beginning service of sentence after filing an appeal. A sentenced appellant needs this option, however, only because ORS 138.135(1) also provides that a sentence is stayed by the filing of an appeal if the appellant elects not to begin serving the sentence. There is no analogous statute governing the effect of an appeal when imposition of sentence has been suspended and probation imposed. It therefore remains to be determined *813 whether an appeal stays probation when imposition of sentence has been suspended.
To resolve the issue we turn to the statutory scheme governing probation. Respondent had the authority to suspend imposition of sentence and place petitioner on probation.[4] Six months incarceration in the county jail is a permissible condition of probation.[5] The statutes grant respondent circuit judge the authority to discharge from probation,[6] or to revoke probation for cause.[7] But there is nothing in the statutory scheme granting authority to stay probation because the conviction has been appealed.
We conclude that the lack of a statute staying probation during appeal means that the mere filing of an appeal has no effect on probation status when imposition of sentence has been suspended. When petitioner appealed his conviction, he therefore continued on probation.
The discretionary release authority granted by ORS 135.285(2), relied upon by respondent, does not change this result. This statute does provide that a judge has discretion to release an appellant pending appeal. The exercise of this discretion cannot, however, result in petitioner's incarceration without receiving credit for the time spent in jail pending appeal. When respondent exercised his discretion not to release petitioner, petitioner was still on probation and remained in jail, thereby fulfilling a condition of his probation. On the other hand, had petitioner been released pending appeal, the time on bail would not be credited toward the probation period because petitioner must spend six months in jail to satisfy his probation conditions.
A serious constitutional question would arise were we to adopt respondent's interpretation of the statutes. Respondent's refusal to credit petitioner with time served during appeal had the effect of forcing petitioner to choose between extra time in jail while appealing his conviction, or not appealing and being released after six months. This would have the effect of penalizing petitioner for taking an appeal. Our cases, as well as those decided by the United States Supreme Court, hold that the state cannot impose such a penalty.[8]
*814 We therefore hold that petitioner's probation was not stayed by his appeal from the underlying conviction. Petitioner has completed the six months in jail required by his probation. Therefore, he should have been released, continuing, however, to be subject to the other conditions until his probation is terminated.
A peremptory writ will issue directing respondent to credit petitioner with serving 180 days required as a condition of petitioner's probation.
NOTES
[*]  HOLMAN, J., did not participate in this decision.
[1]  For purposes of clarity, we will refer to the parties as petitioner and respondent.
[2]  When petitioner filed his appeal, he was brought before Judge Foster, who explained to petitioner the consequences of his appeal as follows: "You are on `dead time,' in other words upon the appeal if there is an affirmance of the matter we go back then and we start your probation again with the time you've already had in custody all right and you'd still have the balance of time in custody * * * all I'm trying to say Mr. Dillavou, is that without an appeal you would probably be out in less than two months, with an appeal you may be in custody another year."
[3]  See ORS 137.010.
[4]  ORS 137.010. * * * "(2) When a person is convicted of an offense, if the court is of the opinion that it is in the best interests of the public as well as of the defendant, the court may suspend the imposition or execution of sentence for any period of not more than five years.

"(3) If the court suspends the imposition or execution of sentence, the court may also place the defendant on probation for a definite or indefinite period of not less than one nor more than five years."
Even though he was never sentenced, petitioner had a right to appeal. ORS 138.040. "The defendant may appeal to the Court of Appeals from a judgment on a conviction in a circuit court; and upon an appeal, any decision of the court in an intermediate order or proceeding may be reviewed. A judgment suspending imposition or execution of sentence of placing a defendant on probation shall be deemed a judgment on a conviction * * *."
[5]  ORS 137.540. "The court shall determine, and may at any time modify, the conditions of probation, which may include, as well as any others, that the probationer shall * * * (9) [b]e confined to the county jail for a period not to exceed one year or one-half of the maximum period of confinement that could be imposed for the offense for which the defendant is convicted, whichever is the lesser."
[6]  ORS 137.550(1)(b). "The court may at any time discharge a person from probation."
[7]  ORS 137.550(2). "At any time during the probation period, the court may issue a warrant and cause a defendant to be arrested for violating any of the conditions of probation. * * * Thereupon the court, after summary hearing, may revoke the suspension of sentence and cause the sentence imposed to be executed."
[8]  This is the import of State v. Turner, 247 Or. 301, 429 P.2d 565 (1967), which held that if defendant successfully appeals and is retried for the same offense and convicted, his sentence cannot be greater than that imposed in the first trial. North Carolina v. Pearce, 395 U.S. 711, 89 S.Ct. 2089, 23 L.Ed.2d 656 (1969), reaches the same result on constitutional grounds unless there are additional facts in the second trial to justify the harsher sentence.
