
631 P.2d 1367 (1981)
291 Or. 441
Jeffrey Marshall SEXSON, Plaintiff-Relator,
v.
Maurice K. MERTEN, Judge of the Circuit Court of the State of Oregon for Lane County, Defendant.
No. 10-81-01724; SC 27750.
Supreme Court of Oregon, In Banc.
Argued and Submitted June 2, 1981.
Decided August 4, 1981.
*1368 Robert J. Larson, Public Defender, Public Defender Services of Lane County, Inc., Eugene, argued the cause and filed the brief for plaintiff-relator.
William F. Gary, Sol. Gen., argued the cause for defendant. With him on the brief were Dave Frohnmayer, Atty. Gen. and Stephen F. Peifer, Asst. Atty. Gen., Salem.
TONGUE, Justice.
This is a mandamus proceeding in which the petitioner, who is the defendant in a criminal prosecution for the crime of rape, seeks to compel the respondent, who is the trial judge before whom defendant secured his release pending trial, to remove certain conditions placed by the judge in the "security release agreement" under which defendant was released pending trial pursuant to ORS 135.265(1) and (2).[1]
The attorneys for the defendant and the attorneys for the State of Oregon, who represent the respondent (the trial judge), agree on the relevant facts of the case. Defendant was indicted for the crime of rape in the first degree and entered a plea of not guilty to the charge. A Release Assistance Officer, pursuant to ORS 135.235,[2] recommended that defendant be released under a "security release agreement" upon deposit of $500, or 10% of $5,000, the security amount recommended by him, as provided by ORS 135.265(2).[3] Defendant was then released from custody upon signing a "security release agreement" and depositing the sum of $500.
The trial judge, however, imposed additional terms upon the "security release agreement" which, as amended, included the following conditions:

*1369 "I will not use or possess nor consume any alcoholic beverages.
"I will report to Lane County Mental Health and participate in all recommended programs there.
"I will report to Waymon Poole [the Release Assistance Officer] when directed to do so."
The record indicates that these conditions were imposed by the trial judge, both to assure defendant's future appearance at trial and also to protect society from future crimes by the defendant pending trial.
After his release, defendant moved to amend the "security release agreement" by requesting omission of the terms restricting alcohol use, requiring him to report to Lane County Mental Health for participation in all recommended programs and requiring him to report to the custody officer when directed to do so. The motion to amend was denied and defendant now seeks a peremptory writ of mandamus.
Defendant contends that the trial court exceeded its statutory authority in imposing these conditions on the "security release agreement." Defendant also contends that the only proper purpose for imposing conditions in a "security release agreement" is to assure the defendant's appearance at trial and that the conditions of his release were improper except to the extent that they were reasonably related to that purpose. Finally, defendant contends that requiring him to report to Lane County Mental Health for treatment violates his privilege against self-incrimination under the state and federal constitutions because anything he said during treatment would not be privileged.

Mandamus
ORS 34.120 provides that the Supreme Court of Oregon may take original jurisdiction in mandamus as provided by Art. VII, § 2 Or. Const., which states:
"The Supreme Court may, in its own discretion take original jurisdiction in mandamus * * *."
Mandamus is a proper remedy when an inferior court acts in excess of its lawful authority, State v. Schwabe, 276 or 853, 857, 556 P.2d 1366 (1976), but is not a remedy available to control judicial discretion. See, e.g., Johnson v. Craddock, 228 Or. 308, 365 P.2d 89 (1961).
Mandamus is also an extraordinary remedy, justified when the defendant has no other plain, speedy or adequate remedy in the ordinary course of the law. See, e.g., State ex rel Willamette Nat. Lumber Co. v. Circuit Court for Multnomah County, 187 Or. 591, 211 P.2d 994 (1949). In this case, mandamus is available to defendant because we find that no plain, speedy or adequate remedy at law is available to defendant and that the trial court acted in excess of its lawful authority in imposing upon the defendant's "security release agreement" a condition which was not reasonably related to providing assurance that defendant appear at trial.

The Statutory Scheme
Under the provisions of statutes adopted by the Oregon legislature in 1973 and 1977, the release of a criminal defendant from custody is provided for in ORS 135.230-135.290 (Or. Laws 1973 Ch. 836, §§ 146-157).[4] Three types of release as provided by these statutes are: (1) release on personal recognizance, ORS 135.230(3),[5] 135.245(3); (2) conditional release, ORS 135.230(1), 135.260;[6] and (3) security release, *1370 ORS 135.230(8), 135.265.[7].
As expressly provided by ORS 135.255(1),[8] and as held by this court in Knutson v. Cupp, 287 Or. 489, 601 P.2d 129 (1979), a defendant must sign and file a "release agreement" with the court regardless of which type of release is involved. In the instant case, the defendant signed a "security release agreement."
Again, by the express terms of ORS 135.230(8), a "security release means release conditioned on a promise to appear in court at all appropriate times, which is secured by cash, stocks, bonds or real property." A defendant may be released under a "security release agreement" when "the defendant is not released on his personal recognizance under ORS 135.255, or granted conditional release under ORS 135.260, or fails to agree to the provisions of the conditional release." ORS 135.265(1). It is also provided by statute that upon depositing a sum set by the magistrate, "the defendant shall be released from custody subject to the condition that he appear to answer the charge in the court having jurisdiction on a day certain * * *." ORS 135.265(2).
A reading of these statutes, standing alone, might lead one to believe that a "security release" is a release on security subject only to the condition that defendant deposit security in an amount sufficient to satisfy the court that he will "appear to answer the charge in the court having jurisdiction on a day certain and thereafter as ordered by the court until discharged or final order of the court."[9] Such an interpretation, however, cannot be reconciled with the requirement of the statute that such a "security release" must be accompanied by the signing and filing of a "release agreement," Knutson v. Cupp, supra and with the further requirement of ORS 135.250(1) that the conditions of such a release agreement are that the defendant will:
"(a) Appear to answer the charge in the court having jurisdiction on a day certain and thereafter as ordered by the court until discharged or final order of the court;
"(b) Submit himself to the orders and process of the court;
"(c) Not depart this state without leave of the court; and
"(d) Comply with other such conditions as the court may impose." (Emphasis added)
These express provisions of ORS 135.250(1) may appear to conflict with the purpose of the release statutes, as stated by ORS 135.245(3), to the effect that "the magistrate shall impose the least onerous condition reasonably likely to assure the person's later appearance." Again, however, it is important to bear in mind that a "conditional release," as provided by ORS 135.260, is distinct from a "security release," as provided by ORS 135.265. Thus it is provided by ORS 135.265(1) that "where the defendant fails to agree to the provisions of the conditional release, the magistrate shall set a security amount that will reasonably assure the defendant's appearance."
*1371 We are constrained to agree, however, with the contention by the defendant that this statutory provision relating to "security release agreements" does not authorize trial courts to impose conditions other than those conditions which, under the facts and circumstances of the particular case, are reasonably necessary to assure the defendant's appearance at trial. The statutory scheme as set forth in ORS 135.230 to 135.290 consistently emphasizes that the objective in determining what type of release to grant is that which is reasonably likely to assure the defendant's later appearance.
"`Release decision' means a determination by a magistrate, using release criteria, which establishes the form of the release most likely to assure defendant's court appearance." ORS 135.230(7) (Definition).
"The magistrate shall impose the least onerous condition reasonably likely to assure the person's later appearance. * *" ORS 135.245(3) (Release Decision).
"This section shall be liberally construed to carry out the purpose of relying upon criminal sanctions instead of financial loss to assure the appearance of the defendant." ORS 135.245(6).
"Any other reasonable restriction to assure the defendant's appearance." ORS 135.260(4) (Conditional Release).
"* * * [T]he magistrate shall set a security amount that will reasonably assure the defendant's appearance." ORS 135.265(1) (Security Release).
(Emphasis added)
The only indication that Oregon's statutory scheme authorizes conditions on a defendant's release for protection of society is found in ORS 135.230(6)(g):
"`Release Criteria' includes the following:
"Any facts indicating the possibility of violations of the law if the defendant is released without regulations."
This provision may provide guidance to trial judges in determining whether a defendant is to be released upon: (a) "personal recognizance," (b) "conditional release," or (c) "security release." This provision does not, however, authorize a trial judge who chooses to release a defendant under a "security release agreement" to impose any conditions other than those which reasonably relate to providing assurance that the defendant will appear at trial.

The Terms of this "Security Release Agreement"
We turn now to the question of whether the conditions imposed on this "security release agreement" were reasonably related to providing assurance that defendant appear at the time and place set for his trial.
As previously stated, this defendant signed a "security release agreement," which as amended, provided as follows:
"I, the above named Defendant, on oath say that I will:

"1. Appear to answer the above stated charge in the District Court of the State of Oregon for Lane County at the Lane County Courthouse in Eugene on the ____ day of ____, 19__ at ____ .M. and thereafter as ordered by the Court having jurisdiction until discharged or final order of such court;
"2. Submit myself to the orders and processes of the Court;
"3. Not depart this State without leave of the Court;
"4. Keep the Court in which this charge is pending, and my attorney, advised in writing of my correct mailing address and, if I have one, my telephone number; and keep this office informed in writing of all changes of address;
"5. Conduct myself as a peaceful and law abiding citizen;
"6. Notify the Court in writing if I am arrested or cited on any criminal charge (other than minor traffic) while the above named case is pending;
"7. Comply with such other conditions as the Court may from time to time impose."
"I will not use or possess nor consume any alcoholic beverages. I will report to Lane County mental health and participate *1372 in all recommended programs there. I will report to Waymon Poole when directed to do so."
(The conditions relating to use of alcohol, reporting to Lane County Mental Health and to Waymon Poole are provisions added by the trial court to the form agreement.)
As previously stated, the "security release agreement" is based upon the provisions of ORS 135.250(1)(a)-(d), which provide that:

"General conditions of release agreement.
"(1) If a defendant is released before judgment, the conditions of the release agreement shall be that he will:
"(a) Appear to answer the charge in the court having jurisdiction on a day certain and thereafter as ordered by the court until discharged or final order of the court;
"(b) Submit himself to the orders and process of the court;
"(c) Not depart this state without leave of the court; and
"(d) Comply with other such conditions as the court may impose." (Emphasis added)
We agree with the trial court that the abuse of alcohol may result in forgetfulness or irresponsibility which, in turn, may result in defendant's failure to appear at trial. If the defendant had an alcohol problem, as would appear from the record in this case, it was appropriate for the trial court, in the exercise of its discretion, to require that defendant neither use, possess nor consume alcohol during the period of the "security release agreement."
For the same reasons, we also agree that it was not improper for the trial court to require that a defendant under a "security release agreement" who has had an alcohol problem must report to a custody officer when directed to do so. We cannot assume that the custody officer will abuse that authority by directing the defendant to report to him at unreasonable times or places.
We do not, however, agree with the requirement that defendant must "report to Lane County Mental Health and participate in all recommended programs there." Requiring defendants to involuntarily participate in governmental health programs is too tenuously related to the assurance of defendants' later appearance at trial to provide the trial courts with authority under ORS 135.265 to impose such a condition in "security release agreements." Neither the release officer who recommended such a condition nor the judge who imposed it stated reasons to believe that such a condition would tend to assure defendants' court appearances and we are aware of none. Because there is no substantial relationship between that condition and the statutory purpose for which such conditions may be imposed, we hold that the trial court exceeded its authority in imposing that condition.
For these reasons, the peremptory writ of mandamus requested by the defendant in this case shall issue forthwith directing the trial court to strike the condition requiring the defendant to "report to Lane County Mental Health and participate in all recommended programs there."[10]
NOTES
[1]  ORS 135.265(1) and (2) provide:

"(1) If the defendant is not released on his personal recognizance under ORS 135.255, or granted conditional release under ORS 135.260, or fails to agree to the provisions of the conditional release, the magistrate shall set a security amount that will reasonably assure the defendant's appearance. The defendant shall execute the security release in the amount set by the magistrate.
"(2) The defendant shall execute a release agreement and deposit with the clerk of the court before which the proceeding is pending a sum of money equal to 10 percent of the security amount, but in no event shall such deposit be less than $25. The clerk shall issue a receipt for the sum deposited. Upon depositing this sum the defendant shall be released from custody subject to the condition that he appear to answer the charge in the court having jurisdiction on a day certain and thereafter as ordered by the court until discharged or final order of the court. * * *"
[2]  ORS 135.235 provides:

"(1) The presiding circuit court judge of the judicial district may designate a Release Assistance Officer who shall, except when impracticable, interview every person detained pursuant to law and charged with an offense.
"(2) The Release Assistance Officer shall verify release criteria information and may either:
"(a) Timely submit a written report to the magistrate containing, but not limited to, an evaluation of the release criteria and a recommendation for the form of release; or
"(b) If delegated release authority by the presiding circuit court judge of the judicial district, make the release decision.
"(3) The presiding circuit court judge of the judicial district may appoint release assistance deputies who shall be responsible to the Release Assistance Officer."
[3]  See note 1, supra.
[4]  We do not address the possible question whether Article I, Section 14 of the Oregon Constitution prohibits the imposition of any conditions in security release agreements because defendant has made no such contention.
[5]  Personal recognizance is the preferred type of release where it is sufficient to assure the defendant's appearance. ORS 135.245(3) and (4). ORS 135.230 defines "personal recognizance" as "the release of a defendant upon his promise to appear in court at all appropriate times."
[6]  ORS 135.230(1) provides:

"`Conditional release' means a nonsecurity release which imposes regulations on the activities and associations of the defendant."
ORS 135.260 provides:
"Conditional release may include one or more of the following conditions:
"(1) Release of the defendant into the care of a qualified person or organization responsible for supervising the defendant and assisting him in appearing in court. The supervisor shall not be required to be financially responsible for the defendant, nor to forfeit money in the event he fails to appear in court. The supervisor, however, shall notify the court immediately in the event that the defendant breaches the conditional release.
"(2) Reasonable regulations on the activities, movements, associations and residences of the defendant.
"(3) Release of the defendant from custody during working hours.
"(4) Any other reasonable restriction designed to assure the defendant's appearance."
[7]  See note 1, supra.
[8]  ORS 135.255(1) provides:

"The defendant shall not be released from custody unless he files with the clerk of the court in which the magistrate is presiding a release agreement duly executed by the defendant containing the conditions ordered by the releasing magistrate or deposits security in the amount specified by the magistrate in accordance with ORS 135.230 to 135.290."
[9]  Arguably, some support for this view may be found in the legislative history, Oregon Crim. Law Revision Commission, Subcommittee # 2, July 26, 1972, at 13-15, but we do not find it conclusive.
[10]  In view of the basis upon which we decide this case, it becomes unnecessary to consider defendant's additional contention that his constitutional rights against self-incrimination might be violated by being required to report for treatment.
