The plaintiff brought a suit to foreclose a construction lien in the amount of $14,017. The lien was for labor and materials used in remodeling the defendants’ residence. The trial court disallowed the lien and proceeded under ORS 87.060(2) and (3) to enter a personal judgment against the defendants for the sum of $8,687. Neither party was awarded attorney fees or costs.
The defendants have appealed, assigning as error the trial court’s failure to award them attorney fees as the prevailing party under ORS 87.060(4).1
The plaintiff has cross-appealed, assigning as error the trial court’s (1) failure to allow its lien and thereby awarding it attorney fees as the prevailing party; and (2) allowing the defendants the wrong per hour credit for indirect labor costs.
*336We affirm.
We will consider the plaintiff’s cross-appeal first. The trial court disallowed the lien for the following reasons:
"The evidence in this case was * * * that plaintiff contractor included in his lien claim an unsegrable [sic], from the face of the lien claim, a non-lienable item, that is, a charge of $3.00 per hour for himself for the hours of his employees labor. The reason the Court calls this a non-lienable item is that under ORS 87.070 he is limited to 'only the amount due him according to the terms of his contract.’ He agrees that the contract he made was cost plus 10% and 7% for profit and overhead. There was no meeting of the minds on the $3.00 per hour charge mentioned above. He attempted to show that the charge was not always as much as $3.00 per hour, but regardless, he made the claim for a substantial item not included in the contract.”
Hays v. Pigg, 267 Or 143, 148, 515 P2d 924 (1973), provides:
"The general rule has been that where unsegregated lienable and nonlienable charges are lumped together in the lien as one item so that extrinsic evidence is necessary to segregate them, the right to a lien is lost as to all such unsegregated items. Smith v. Lichtenthaler, 206 Or 584, 586, 294 P2d 334 (1956); Anderson v. Chambliss, 199 Or 400, 414, 262 P2d 298 (1953). The reason for the rule is stated in Benj. Franklin S&L v. Hallmark, 257 Or 436, 441, 479 P2d 740 (1971), to be the right of the owner to know from the face of the lien as filed, the amounts of valid claims which have become a charge upon his property so that he may, in advance of foreclosure, discharge the property from the encumbrance by rendering a payment without incurring the cost of litigation.”
See also Farmer’s Feed v. Industrial Leasing, 286 Or 311, 594 P2d 397 (1979).
We agree with the trial court that the $3.00 hourly charge made by the plaintiff was a nonlienable item which was not segregated and, therefore, the lien must fail.
*337 Under ORS 87.060(2) and (3), once the lien has been disallowed the case then continues as an action at law. This is a codification of the rule in Ward v. Town Tavern, 191 Or 1, 228 P2d 216 (1951), where it was held that when a lien failed the court should retain the case to determine any other well pleaded issues. A jury had not been requested in this case and the trial court proceeded to find that the plaintiff was entitled to recover from the defendants the sum of $8,687. This finding by the trial court is the equivalent of a jury verdict. The record provided shows that there was substantial evidence to support the trial court’s finding as to the per horn- credit given the defendants for indirect labor costs.
It is the defendants’ position that since the lien failed they are entitled to $3,000 as reasonable attorney fees because they are the prevailing party.2
ORS 87.060(4) in part provides:
"In suits to enforce a lien created by ORS 87.010, the court shall allow as part of the costs a reasonable amount as attorney fees to the prevailing party,
Hi * ”
In order to recover attorney fees the defendants must be entitled to costs as the prevailing party. This case concluded as an action at law. Costs in an action at law are not discretionary with the trial court but are controlled by statute. Nob Hill Garage & Auto Co. v. Barde, 69 Or 260, 138 P 836 (1914).
ORS 20.040 reads in part:
"Costs are allowed, of course, to plaintiff upon a judgment in favor of the plaintiff in:
*338* * *
"(5) An action not hereinbefore specified for the recovery of money or damages when the plaintiff shall recover $100 or more.”
ORS 20.060 provides in part:
"Costs are allowed to the defendant in the actions mentioned in ORS 20.040, unless the plaintiff is entitled to costs therein, * * *.”
The defendants are not entitled to costs as the prevailing party and, therefore, cannot be allowed attorney fees.3
Affirmed.