Defendant was convicted of criminal trespass in the first degree, ORS 164.255, and was ordered to pay $400 in court-appointed attorney fees. On appeal, he makes two assignments of error. First, he challenges the trial court’s denial of his motion for judgment of acquittal; we reject that contention without published discussion. In his second assignment of error, defendant contends that the trial court erred in imposing attorney fees in the absence of evidence in the record of his ability to pay those fees as required by ORS 151.505(3). Defendant acknowledges that he did not preserve that claim of error, but urges us to review and correct the error as “an error of law apparent on the record,” ORAP 5.45(1), or “plain error.” The state disputes that the error here is plain and, in any event, contends that we should not exercise our discretion to correct it. As we explain below, we agree with defendant that it is appropriate for us to review and correct the error in this case. Accordingly, we reverse the attorney fee award and otherwise affirm.
Notwithstanding a defendant’s failure to object at trial, an appellate court “may consider an error of law apparent on the record.” ORAP 5.45(1). We have held that it is “plain error” for a trial court not to comply with the requirement that it find that a defendant has the ability to pay fees before it imposes them. State v. Coverstone, 260 Or App 714, 716, 320 P3d 670 (2014); see ORS 151.505(3) (a trial court may not impose costs unless the person “is or may be able to pay the costs”). The state bears the burden of proving that defendant “is or may be able to pay” attorney fees. State v. Kanuch, 231 Or App 20, 24, 217 P3d 1082 (2009). “A court cannot impose fees based on pure speculation that a defendant has funds to pay the fees or may acquire them in the future.” State v. Pendergrapht, 251 Or App 630, 634, 284 P3d 573 (2012).
On appeal, defendant contends that the trial court “was not statutorily authorized to impose” attorney fees because the record contains no evidence that defendant is or may be able to pay the fees. Specifically, defendant notes that the only evidence in the record of his financial situation is that he was homeless at the time of his arrest, he has an *348unspecified “mental illness,” and he has a “severe problem with alcohol dependency.” In addition, defendant points out that at the time of sentencing, defendant had spent 60 days in jail and the court anticipated that he would continue to be detained on an existing immigration hold that could result in his deportation.
The state argues that the trial court did not “plainly err” because there was evidence in the record that defendant “is or may be able to pay the costs.” ORS 151.505(3). Specifically, the state notes that defendant’s probation officer discussed her knowledge of defendant at sentencing, including that he had successfully completed his prior probation; that he had been seeking counseling and sometimes took his medication for his mental illness; and that prior to his arrest for the offense at issue, defendant had told her that he would be able to find work through friends. The state contends that the trial court could have reasonably inferred from those facts that defendant “is or may be able to pay the costs” and, consequently, that any error is not plain.
The problem with the state’s argument is that it relies on speculation. The argument that, with court-ordered alcohol and mental health treatment, defendant would be employable in the future, fails to account for the facts that defendant is homeless, mentally ill, and on an immigration hold with the likelihood of being deported. Particularly in light of the lack of any post-arrest evidence of defendant’s ability to earn money to pay the attorney fee award, and because a court “cannot impose fees based on pure speculation that a defendant has funds to pay the fees or may acquire them in the future,” we agree with defendant that the trial court plainly erred in imposing attorney fees. Pendergrapht, 251 Or App at 634.
“When a plain error is established, we still must determine if it is appropriate to exercise our discretion to correct the error, considering, among other things, ‘the gravity of the error, the ends of justice in the particular case; how the error came to the court’s attention; and whether the policies behind the general rule requiring preservation of error have been served *** in another way.’” Coverstone, 260 Or App at 716-17 (quoting Ailes v. Portland Meadows, *349Inc., 312 Or 376, 382, 382 n 6, 823 P2d 956 (1991)). We agree with defendant that those factors weigh in favor of correcting the error in this case. Here, the error is grave; although $400 may not be a substantial amount to pay for some defendants, it is for this defendant. He is homeless, mentally ill, and on an indefinite immigration hold that likely will result in deportation. Moreover, contrary to the state’s view, this is not a case in which the trial court could have made the necessary finding regarding ability to pay if the issue had been brought to its attention because, while there is some speculative evidence that defendant might find work in the future, the actual evidence is to the contrary. Accordingly, the state’s suggestion that the error is not grave because defendant could petition the court to reduce or eliminate the fees if they ultimately create a substantial hardship is not well taken.
Portion of judgment requiring defendant to pay attorney fees reversed; otherwise affirmed.