At issue in this case is whether the trial court properly applied funds posted as security to other court-ordered obligations. We hold that it did and affirm.
Defendant was charged with manslaughter in the first degree. His mother posted $25,000 security. Both defendant and his mother signed a “release order and agreement.” That agreement first lists various conditions of release, including:
“Pursuant to the provisions of ORS 135.250, the Defendant named above is released subject to the following conditions:
“5. That security posted on Defendant’s behalf will be applied to any fine, costs or restitution imposed on this case or any other case.”
(Emphasis added.) Following that portion is a place for defendant to sign, and he did so. The agreement then contains a statement of “surety verification of net worth and agreement,” which provides:
“I hereby certify that my total unencumbered assets are equal to no less than double the total amount of security set above. I understand that if the Defendant fails to comply with any of the terms and conditions set on this Release Order, I am liable for the full amount of the security set. I further understand that security release costs plus any fines or other financial obligations assessed against the Defendant in this case or any other case will be taken out of the security amount posted.”
(Emphasis added.) Following that provision is a place for the person posting the security to sign, and defendant’s mother did so. The agreement also contains a provision entitled “Information on Person Posting Bail” followed by a signature line containing the following statement:
“I understand that if the Court orders the security amount forfeited in this case that I stand liable for the full amount of security. Read reverse side for conditions of bail! security money.”
*569(Emphasis added.) Defendant’s mother’s signature appears on the signature line. On the reverse side is the following statement:
“Before security release refunds are made, unless otherwise ordered, the court will apply funds being held to all court ordered obligations owed by the defendant on this or any other case. YOUR REFUND WILL BE REDUCED BY THE SECURITY RELEASE COSTS MENTIONED ABOVE, AND BY ALL AMOUNTS OWED BY THE DEFENDANT ON THIS OR ANY OTHER CASE.’’
(Boldface, underscoring in original.) Mother subsequently assigned an interest in the $25,000 security to defendant’s attorney, Ronald Hoevet.
Defendant entered a plea of no contest and was found guilty of criminally negligent homicide. Meanwhile, defendant had become subject to a civil judgment in another matter. He also had accrued approximately $14,000 in back child support payment obligations. The plaintiffs in the civil case, Don A. Carpenter and Don A. Carpenter, Jr., sought an order of the court to enforce their civil judgment against the security amount and filed writs of garnishment against the security. The state likewise sought an order to show cause why the security should not be applied to the child support arrearage. The trial court entered orders to show cause why the security should not be applied to both obligations. Defendant, his mother, and Hoevet then filed motions to exonerate bail, arguing that the $25,000 security belonged to defendant’s mother and, by assignment, to Hoevet, and could not be applied to obligations that they did not incur. The trial court denied the motions to exonerate, ordered that approximately $14,000 of the security deposit be applied to defendant’s child support obligations, and ordered that the balance be subject to the writ of garnishment in the Carpenter action.
On appeal, defendant, his mother, and Hoevet— collectively referred to as “appellants” — first argue that the trial court erred in denying their motions to exonerate. They argue that the trial court lacked authority to apply the $25,000 security posted by mother to obligations unrelated to the criminal proceeding against defendant. The state argues that, under ORS 135.265 and the terms of the release order *570and agreement, the trial court possessed the authority to apply the security to amounts that defendant owed in this or any other case. Appellants reply that the terms of the release order and agreement are unenforceable as “contrary to law and public policy.”
ORS 135.265(2) (1997)1 provided, in part:
“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 * * *. When conditions of the release agreement have been performed and the defendant has been discharged from all obligations in the cause, the clerk of the court shall return to the person shown by the receipt to have made the deposit, unless the court orders otherwise, 85 percent of the sum which has been deposited and shall retain as security release costs 15 percent * * *.”
The text of the statute suggests that at least two requirements must be satisfied before the trial court may return a security deposit either to a defendant or some other person who supplied the funds. First, the defendant must have performed all of the conditions of the release agreement. Second, the defendant must have been discharged from all obligations in the cause. Even then, however, the court is not required to return the security deposit. The statute provides that the money is to be returned, “unless the court orders otherwise.”
Case law confirms what the text suggests. In State v. Davis (A70732), 116 Or App 607, 843 P2d 460 (1992), we held that, under ORS 135.265(2),
“[a] court has broad discretion to retain some or all of a security deposit. Even a defendant who has performed all of the conditions of his release agreement and has satisfied all obligations in the cause is still not necessarily entitled to the return of his security deposit after release costs.”
Id. at 610. Furthermore, case law construing ORS 135.265(2) makes clear that the discretion of the court to withhold the return of the security deposit applies whether or not the *571source of the deposit was a third party. In State v. Grant, 44 Or App 671, 606 P2d 1166 (1980), we held that, consistent with the Supreme Court’s construction of an earlier version of the statute, see Rosentreter v. Clackamas County, 127 Or 531, 534, 273 P 326 (1928), the security deposit “is to be regarded as belonging to the defendant” and may therefore be withheld to pay obligations of the defendant. Grant, 44 Or App at 674. Likewise, in Davis, we commented that “[w]e are not aware of any requirement that money deposited as security by a third party be treated any differently than if it were deposited by the defendant,” and upheld the order of the trial court to apply a security deposit provided by a third party to pay obligations of the defendant. 116 Or App at 610.
Appellants argue that we should read the statute, Davis, and Grant to permit the trial court to apply a security deposit provided by a third person only to obligations in the cause, that is, in the criminal proceeding itself. Nothing in the language of the statute or in either of the two opinions supports such a limitation on the discretion of the court.
Appellants insist that the release agreement itself is unenforceable because it is at odds with the limited authority conferred by ORS 135.265(2). The argument is circular, however. It assumes that the authority conferred by the statute is as limited as appellants suggest. As we have explained, the language and the relevant case law do not support appellants’ reading of the statute. We conclude that the trial court did not err in denying appellants’ motions to exonerate.
Appellants next argue that the trial court erred in subjecting the security deposit to the Carpenters’ writs of garnishment. According to appellants, a writ of garnishment is effective only against property of defendant, and the security deposit was the property of defendant’s mother and Hoevet. Appellants neglect to consider that, as we held in Grant, money deposited with the court as security under ORS 135.265(2) “is to be regarded as belonging to the defendant.” 44 Or App at 674. Moreover, before she assigned her interest in the security to Hoevet, defendant’s mother deposited the funds with the court on the express condition that the funds would be used to satisfy defendant’s obligations “in this or any other case.” In other words, defendant’s mother *572voluntarily offered the security to be used to satisfy defendant’s obligations. We conclude that the trial court did not err in subjecting the security deposit to the Carpenters’ writs of garnishment.
Affirmed.
ORS 135.265 was amended in 1999. Or Laws 1999, ch 1030, § 5. The amendments, however, were not made retroactive and do not apply to this case.