
547 P.2d 123 (1976)
Jack L. GORMAN, Respondent,
v.
Howard L. BOYER, Sr., Appellant.
Supreme Court of Oregon, In Banc.
Argued and Submitted February 6, 1976.
Decided March 18, 1976.
Donald C. Walker, Portland, argued the cause and filed the brief for appellant.
Dean M. Alexander, Portland, filed the brief for respondent.
TONGUE, Judge.
This is an appeal from an order denying attorney fees to defendant in an action on a contract which provided that in the event of litigation the plaintiff was to be paid "such reasonable attorneys' fees as may be fixed by the court on trial and on appeal."
In their pleadings both plaintiff and defendant requested attorney fees. The case went to trial with both parties offering evidence on the merits of the case. Neither party offered any evidence as to the reasonable value of attorney fees, nor was there any stipulation on that subject.
The trial court took the case under advisement and by letter opinion informed the parties that it held in favor of the defendant. Findings of Fact, Conclusions of *124 Law and Judgment were then entered in favor of defendant and allowing costs to the defendant in an amount that was left "blank" in the Judgment, as signed and filed. The Findings of Fact included a finding that "[n]o evidence was produced by either party as to the reasonable value of attorney fees."
Defendant then submitted a cost bill which included a claim for $750 as attorney fees. Plaintiff objected to the allowance of attorney fees. Defendant then filed a petition for allowance of attorney fees in the sum of $730, based upon a statement of time devoted to the case.
After hearing arguments, the trial court entered an order denying that petition, based upon a letter opinion stating that:
"* * * I did not include any award of attorney fees in the judgment because there was no evidence in the case as to the reasonable value of services as recited in the findings of fact, nor was there a stipulation by the parties that the court could fix the fees.
"You did not object to that finding of fact nor ask leave to reopen your case. You simply decided to include your own chosen amount of $750 in the cost bill as an attorney fee and I have stricken that item of costs on motion of your adversary."
The trial judge also disagreed with defendant's reliance upon the decision of this court in Dean Vincent, Inc. v. Krishell Labor., 271 Or. 356, 532 P.2d 237 (1975), pointing out that in that case the parties had stipulated to the reasonable value of attorney fees, if allowed, and that it was held that the request for attorney fees in the cost bill in that case was properly denied because the right to attorney fees in that case arose out of the contract and the "terms of ORS 20.096."[1]
The trial court also relied upon our previous decision in State High. Com. et al. v. Kendrick et al., 227 Or. 608, 610-11, 363 P.2d 1078, 1079 (1961), in which we said that:
"It has long been settled in Oregon that the amount of the attorney's fee to be allowed in an action at law is a question of fact to be determined by the trier of fact upon pleading and evidence in the same manner as any other question of fact. The rule is applicable whether the attorney's fee is allowed by statute; [citing cases] or by contract; [citing cases].
* * * * * *
"The only exception to the rule, either in law or in equity, is when the parties stipulate that the court may fix the attorney's fee without hearing evidence on that issue. [Citing cases]."
It appears that in Dean Vincent, Inc. the stipulation was not that the trial court might fix the attorney fees without hearing evidence on that issue, as is often done, but was a stipulation as to "the proper amount to be allowed if, upon appeal, it was concluded that defendant was entitled to attorney's fees." Also, in Dean Vincent, Inc. defendant had previously pleaded a counterclaim for attorney fees and also filed a petition for attorney fees, as in this case, and did so prior to the entry of the final judgment. Under those facts we held 271 Or. at ___, 532 P.2d at 239):
"Certainly, defendant made it known that he was requesting attorney's fees, and the court ultimately ruled on the merits of his request. We are not going to quibble about the form in which defendant made his original request. Whether a counterclaim was or was not the proper technical method by which to *125 request attorney's fees, it accomplished the principal purpose of a pleading, which is to inform the pleader's adversary of the pleader's position. In any event, if a request for fees can be made only after defendant prevails, as the trial court held, a petition is a proper way to present the matter as long as defendant has informed his adversary at the commencement of the case that fees will be requested if defendant is ultimately successful in the defense of that action."
As also held in Dean Vincent, Inc. (271 Or. at ___, 532 P.2d 237) we do not construe ORS 20.096 to require that evidence on the reasonableness of attorney fees be offered during the trial on the merits of the case, but that the legislature used the words "at trial" to "distinguish proceedings at the trial court level as compared with those on appeal * * *."
In this case defendant made known to plaintiff his request for attorney fees by his answer, in which he pleaded a demand for allowance of attorney fees. Plaintiff, by his complaint, had also pleaded a similar demand for attorney fees. In such a case, when tried before the court without a jury and then taken under advisement by the trial court, there is little sense in a requirement that each party offer evidence on attorney fees during the trial on the merits, even in the absence of a stipulation permitting the trial court to make a subsequent determination of attorney fees.
Instead, it is proper in such cases for both parties to await a decision by the trial court and then file a petition for allowance of attorney fees. If the opposing party declines to stipulate that attorney fees may be fixed by the trial court without the offer of evidence at a hearing, a separate hearing can then be held at which such evidence may be offered.
Such a petition, however, should be filed and such a determination of attorney fees should be made, either based on stipulation or on evidence offered at such a hearing, prior to the entry of final judgment. As held in Dean Vincent, Inc., an allowance of attorney fees under ORS 20.096, based upon the terms of a contract, is not proper as an allowance of costs in a cost bill to be filed after the entry of a judgment allowing costs. To the same effect, see Sherwood & Roberts v. Alexander, 269 Or. 389, 398, 525 P.2d 135 (1974).
The basis for allowance of attorney fees in such cases is different than in cases involving statutes which expressly provide that attorney fees may be allowed as a part of the costs of an action. See ORS 20.080 and Tiano v. Elsensohn, 268 Or. 166, 169, 520 P.2d 358 (1974).
In this case defendant did not file his petition for allowance of attorney fees until after the entry of final judgment. In such a case a trial judge may, in his discretion, permit the reopening of the judgment for such a purpose, based upon a proper application. See ORS 18.160. Cf. Wells v. Wells, 262 Or. 44, 51, 496 P.2d 718 (1972). No such application was made by the defendant in this case. Under these circumstances the trial judge did not abuse his discretion in declining to reopen the final judgment for the purpose of considering a petition for attorney fees which should have been filed prior to entry of that judgment.
Finding no error, the judgment of the trial court is affirmed.
NOTES
[1]  ORS 20.096(1) provides:

"In any action or suit on a contract, where such contract specifically provides that attorney fees and costs incurred to enforce the provisions of the contract shall be awarded to one of the parties, the prevailing party, whether he is the party specified in the contract or not, at trial or on appeal, shall be entitled to reasonable attorney fees in addition to costs and necessary disbursements."
