
634 P.2d 812 (1981)
54 Or.App. 267
William D. KING and Betty A. King, Doing Business As Kings Kustom Kabinets, Appellants,
v.
George R. SUNIGA and United Savings Bank (Formerly First Federal Savings & Loan Association of Salem), Respondents.
No. 110695; CA 17066.
Court of Appeals of Oregon.
Argued and Submitted December 17, 1980.
Decided October 12, 1981.
James K. Belknap, Portland, argued the cause and filed the briefs for appellants.
Terry K. Haenny, Salem, filed the brief for respondents.
Before JOSEPH, P.J., and WARDEN and WARREN, JJ.
WARDEN, Judge.
This is a suit to foreclose a construction lien. Because defendant Suniga (hereafter defendant) had tendered into court an amount equal to the sum which the trial court found was due plaintiffs on the construction contract, the trial court refused to foreclose plaintiffs' construction lien and awarded defendant attorney fees, pursuant *813 to ORS 87.060(4).[1] Plaintiffs appeal. The question is: Which party, if either, is entitled to recover attorney fees?
The parties entered into a written contract for the installation of cabinets by plaintiffs in an apartment complex owned by defendant. The contract price was $16,750. The contract was orally modified to include $1000 for additional installations. Defendant paid $16,500 of the contract price before plaintiffs filed their lien, in which they claimed that the contract price was $18,230. In their complaint to foreclose the lien, they sought judgment for the sum of $1730 ($18,230 less $16,500 already paid) and for attorney fees.
In the amended answer, defendant admitted that there was $1250 still due and owing on the contract. He counterclaimed for damages of $450, and tendered the sum of $800 into court. Defendant prevailed on his counterclaim. The difference, $480, between the balance due on the contract price claimed by plaintiffs and the sum defendant admitted was still due and owing was a claim for extra transportation charges, for what were referred to in the trial as "dry runs."
The trial court concluded that sums which plaintiffs included in the lien for "dry runs" were not lienable, because they were not part of the contract of the parties. The court found:
"[T]here is neither pleading nor evidence that there was an agreement requiring Defendant to pay for the `dry runs'. In fact, what evidence exists is to the contrary. * * * Whatever may have been the reasonable value of the `dry runs' or the cause of the `dry runs', there was no agreed upon contractual provision supporting the obligation of Defendant to pay for the extra transportation or `dry runs'."
The court reasoned:
"[H]aving now concluded that the `dry runs' were not a part of the original agreement or any agreed upon modification thereof between Plaintiff and Defendant, [the court] finds that the `dry runs' are not a lienable item under ORS 87.070."
With the charges for "dry runs" deducted, defendant's tender was sufficient to satisfy plaintiffs' lien claim.
Although the trial court refused to allow the charges for "dry runs" as part of the lien claim, it did find that plaintiffs were entitled to recover separately the reasonable value of those "dry runs" which were made upon the specific request of defendant after the parties had entered into the contract. It found that value to be $180 and included an award of that sum to plaintiffs in its decree.[2]
Plaintiffs contend that the "dry runs" charges were properly included in their lien and, therefore, that the trial court erred in refusing to foreclose the lien and award them attorney fees pursuant to ORS 87.060(4). The evidence does not support plaintiffs' contention.
ORS 87.070 provides:
"Any contractor may recover, upon a lien filed by him, only the amount due to him according to the terms of his contract * * *." (Emphasis added.)
The record reveals no evidence that there was an agreement by defendant to pay for the extra transportation involved in the "dry runs." The claim for "dry runs" was not a lienable item, because it was not a part of the parties' contract. See Hoskins v. Powder Land & Irr. Co., 90 Or. 217, 225, *814 176 P. 124 (1918).[3] By his successful counterclaim and his tender into court, defendant fully satisfied the balance of plaintiffs' valid lien claim. We conclude that the trial court was correct in refusing to foreclose plaintiffs' lien.
Because plaintiffs' suit to foreclose their lien claim failed, they are not entitled to recover attorney fees pursuant to ORS 87.060(4). Defendant, by successfully defending the lien foreclosure, would have been entitled to attorney fees under ORS 87.060(4), if he had tendered into court a sum sufficient to pay all that was awarded plaintiffs. Cloyd v. McPherson, 283 Or. 137, 582 P.2d 423 (1978). For a party to recover attorney fees under ORS 87.060(4), he must be entitled to costs as the prevailing party. Betz Construction v. Peterson, 47 Or. App. 333, 337-338, 614 P.2d 1184, rev. den. 289 Or. 677 (1980). Because plaintiffs recovered $180 more than the total of defendant's tender and successful counterclaim, plaintiffs, and not defendant, were the prevailing parties in the case. The trial court erred in awarding attorney fees to defendant.
Because plaintiffs, though losing their suit to foreclose their lien, prevailed in the overall case, they are entitled to costs only, pursuant to ORS 20.040(5).[4]
Reversed and remanded.
NOTES
[1]  ORS 87.060(4) provides:

"When notice of intention to commence suit to foreclose the lien has been given, pleaded and proven as provided for in ORS 87.057, the court, upon entering judgment for the lien claimant, shall allow as part of the costs all moneys paid for the filing or recording of the lien. In suits to enforce a lien created by ORS 87.010 the court shall allow as a part of the costs a reasonable amount as attorney fees to the prevailing party, except as provided in subsection (2) of ORS 87.039 and subsection (3) of ORS 87.057."
[2]  The claim for "dry runs" was not separately pleaded, but was only claimed as a part of the lien which was disallowed. Defendant does not appeal the judgment awarded plaintiffs in the sum of $180 for "dry runs."
[3]  In Hoskins v. Powder Land & Irr. Co., 90 Or. 217, 225, 176 P. 124 (1918), the Supreme Court stated:

"If [work] was not connected with the contract, it does not constitute a lienable item."
In 1918, when Hoskins was decided, the relevant portion of the mechanic's lien law, General Laws of Oregon § 7426, p. 2655 (Lord 1909-1910), provided:
"Any contractor shall be entitled to recover, upon a lien filed by him, only such amount as may be due to him according to the terms of his contract * * *."
[4]  ORS 20.040(5) provides:

"Costs are allowed, of course, to the plaintiff upon a judgment in favor of the plaintiff in:
"(5) An action not hereinbefore specified for the recovery of money or damages when the plaintiff shall recover $100 or more."
