
57 Cal.2d 309 (1962)
369 P.2d 7
19 Cal. Rptr. 479
LA MESA-SPRING VALLEY SCHOOL DISTRICT OF SAN DIEGO COUNTY, Plaintiff and Respondent,
v.
NOBUO OTSUKA, Defendant and Appellant.
Docket No. L.A. 26634.
Supreme Court of California. In Bank.
February 19, 1962.
*311 David W. Hardin for Defendant and Appellant.
Henry A. Dietz, County Counsel, and Donald L. Clark, Deputy County Counsel, for Plaintiff and Respondent.
William H. MacKay as Amicus Curiae on behalf of Plaintiff and Respondent.
PETERS, J.
Defendant appeals from an order of the trial court striking two items from his cost bill submitted in an eminent domain action abandoned by the plaintiff prior to trial.
The facts are as follows. As early as August 1958 plaintiff school district indicated to defendant that it intended to acquire his property by condemnation. Defendant, thereupon, employed an attorney to help him prepare for the expected trial, to represent him in negotiations looking toward a settlement, and to prevent condemnation if possible. In April 1960 plaintiff commenced the condemnation action. Defendant's attorney received permission of plaintiff to delay filing his answer until 10 days after written notice from plaintiff to do so. On July 20, 1960, before this notice had been given, plaintiff filed a notice of abandonment and a notice of motion for an order of dismissal. This motion was granted August 4, 1960. Within 10 days thereafter defendant filed a motion to *312 tax costs pursuant to Code of Civil Procedure section 1255a,[1] requesting an award of $1,100 as costs for appraisers, and $3,500 for attorney's fees. The trial court struck both items from the cost bill, and defendant has appealed.
The $1,100 item for appraisal fees was properly stricken. [1] The right to an award of costs is, of course, purely statutory. (Estate of Johnson, 198 Cal. 469, 471 [245 P. 1089]; Bond v. United Railroads, 20 Cal. App. 124, 127 [128 P. 786].) Code of Civil Procedure section 1255a authorizes, upon the plaintiff's abandonment of an eminent domain proceeding, the recovery of "costs and disbursements, which shall include all necessary expenses incurred in preparing for trial and during trial and reasonable attorney fees."
[2] Even if the terms "costs and disbursements" be strictly construed so as to limit recovery under that phrase to "those fees and charges which are required by law to be paid to the courts or some of their officers, or the amount of which is expressly fixed by law" (Blair v. Brownstone Oil & Refining Co., 20 Cal. App. 316, 317 [128 P. 1022], approved in Moss v. Underwriters' Report, Inc., 12 Cal.2d 266, 274 [83 P.2d 503]), section 1255a does not limit the amount recoverable to simply "costs and disbursements" in the event of an abandonment, but expands such recovery to "all necessary expenses incurred in preparing for trial." [3] Therefore, it follows that appraisal fees, under section 1255a, in the event of abandonment, are normally recoverable if reasonably incurred as a part of trial preparation. (Metropolitan Water *313 Dist. v. Adams, 23 Cal.2d 770 [147 P.2d 6].) But here the abandonment occurred before a trial date had been set. The section specifically excludes the recovery of "expenses incurred in preparing for trial where the action is dismissed 40 days or more prior to the time set for the pretrial conference in the action or, if no pretrial conference is set, the time set for the trial of the action." (Code Civ. Proc., § 1255a, subd. (c), fn. 1, supra.) Thus, section 1255a first allows the recovery of appraisal fees as a part of the expenses reasonably incurred in trial preparation in the event of an abandonment, and then takes away this right if the abandonment occurs more than 40 days prior to the day set for trial. The right to such fees being purely statutory, the trial court correctly struck this item from the cost bill.
The same reasoning, however, does not apply to attorney's fees. [4] The right to such fees is, also, of course, purely statutory. (Code Civ. Proc., § 1021; City of Los Angeles v. Abbott, 217 Cal. 184, 194 [17 P.2d 993]; Coburn v. Townsend, 103 Cal. 233, 235-236 [37 P. 202]; County of Los Angeles v. Hale, 165 Cal. App.2d 22, 28-29 [331 P.2d 166].) [5] Plaintiff contends that under section 1255a attorney's fees are one of the expenses "incurred in preparing for trial," and that therefore when the eminent domain action is dismissed more than 40 days prior to trial that expense, just as appraisal fees, is not recoverable, citing County of Los Angeles v. Lorbeer, 158 Cal. App.2d 804, 815 [323 P.2d 542]. This argument simply disregards the language of the section. Section 1255a carefully draws a distinction between "attorney fees" and "expenses incurred in preparing for trial." Subdivision (c) of 1255a refers to "costs and disbursements, which shall include all necessary expenses incurred in preparing for trial and during trial and reasonable attorney fees." Then that subdivision uses this language, "[t]hese costs and disbursements, including expenses and attorney fees," again making a distinction between the two. And finally the section provides that "said costs and disbursements shall not include expenses incurred in preparing for trial where the action is dismissed 40 days or more prior ... [to pretrial or trial, if no pretrial conference has been set]." Attorney's fees here were excluded. Under the section, it is only an award of "expenses incurred in preparing for trial" which the statute excludes when the action is abandoned prior to the 40-day period. Where the action is abandoned more than 40 days before the time set for *314 either a pretrial conference or a trial then the defendant may recover reasonable attorney fees, but cannot recover "expenses incurred in preparing for trial." (City of Inglewood v. O.T. Johnson Corp., 113 Cal. App.2d 587 [248 P.2d 536].) The dictum to the contrary found in County of Los Angeles v. Lorbeer, supra, 158 Cal. App.2d 804, at page 815, is disapproved. The 40-day period has no application at all to attorney's fees. Thus a reasonable attorney's fee is recoverable.
It is urged, however, that section 1255a permits the allowance of such fees only when the abandonment is voluntary. It is contended that the abandonment in the instant case was caused by the activities of the defendant, and was not the result of voluntary action on the part of the plaintiff. It is urged that section 1255a was never intended to apply to such a situation.
The case of Will County v. Cleveland, 372 Ill. 111 [22 N.E. 2d 929] is cited in support of this contention. There the county commenced an action to condemn a strip across property owned by Cleveland. Included in the strip proposed to be condemned was land in which a school district had an interest. The school district was not named as a defendant. Cleveland wanted the county to change the route of the proposed highway across his property. He secured several continuances of the condemnation action, and then assisted the school district in securing an injunction restraining further proceedings in the condemnation action. After the injunction had been secured, Cleveland negotiated with the county to secure the desired change of route. The county agreed to change the route. Thereupon the county and Cleveland agreed upon a price for the land taken. After this sum had been paid the county dismissed the condemnation suit and the injunction proceeding was also dismissed. Cleveland then demanded a fee for his attorney. Illinois has a statute (Ill. Rev. Stat. 1937, ch. 47, § 10) somewhat similar to portions of section 1255a of the Code of Civil Procedure, to the effect that upon dismissal by the plaintiff of the condemnation action prior to trial the defendant is entitled to his costs and reasonable attorney fees incurred in preparation for the defense of the action. The Supreme Court of Illinois, in reversing an award of attorney fees, held that under the facts the defendant was not entitled to such an allowance. It pointed out that the fees were incurred in assisting the school district in securing the injunction, and in inducing the plaintiff to change its route. *315 Thus the fees were not incurred in defense of the action, and the dismissal of the condemnation was not voluntary within the meaning of the section. In this connection the court stated (22 N.E.2d 929, 930): "It is not the purpose of section 10 of the Eminent Domain act to give defendants costs, expenses, and attorney's fees for winning their case. Its purpose is to reimburse the property owner where petitioner voluntarily abandons its condemnation suit either before or after judgment. Where the record shows the abandonment or dismissal was caused by defendant, as in this case, he cannot recover."
It can be argued that when an abandoment is induced by the securing of an injunction by a third person such abandonment is not voluntary. But that is not this case. [6] In the instant case, after the defendant started to prepare for trial, the plaintiff, without compulsion of any kind, dismissed the action. That was a voluntary dismissal and section 1255a is applicable.
Plaintiff next contends that even if the defendant is entitled to attorney fees, such recovery must be limited to an allowance for fees where the obligation for them was incurred after the condemnation suit was filed. Defendant contends that he is entitled to a reasonable attorney's fee incurred in preparation for trial, and that may include a fee for services rendered prior to the filing of the action. We agree with defendant.
Prior to the commencement of this action, but after plaintiff had indicated to defendant its intention to take defendant's property, defendant retained an attorney to represent him in connection with the proposed suit. The attorney rendered certain services which included preparing for the expected trial, negotiations with plaintiff as to price, conferences with appraisers to determine the highest probable use of the land and its value, various attempts made to dissuade plaintiff from taking defendant's land, and similar services. The value of all services rendered in preparation for trial after the complaint was filed are clearly recoverable. The question is whether the value of such services for such purpose, rendered prior to the filing of the complaint, is recoverable, if reasonably necessary in preparing for the expected trial.
[7] Section 1255a compensates the defendant for "reasonable attorney fees" whether the action is abandoned prior (City of Inglewood v. O.T. Johnson Corp., supra, 113 Cal. App.2d 587; City of Los Angeles v. Los Angeles-Inyo Farms *316 Co., 134 Cal. App. 268 [25 P.2d 224]; Mojave etc. R.R. Co. v. Cuddeback, 28 Cal. App. 439 [152 P. 943]) or subsequent to trial (People v. Thompson, 5 Cal. App.2d 668 [43 P.2d 606]; City of Los Angeles v. Clay, 126 Cal. App. 465 [14 P.2d 926]). [8] The determination of what is a reasonable fee is a question of fact that rests within the discretion of the trial court (County of Riverside v. Brown, 30 Cal. App.2d 747, 749 [87 P.2d 60]; State of California v. Westover Co., 140 Cal. App.2d 447 [295 P.2d 96]), after it has considered a number of factors including "[t]he nature of the litigation, its difficulty, the amount involved, the skill required in its handling, the skill employed, the attention given, the success or failure of the attorney's efforts, the attorney's skill and learning, including his age and experience in the particular type of work demanded." (City of Los Angeles v. Los Angeles-Inyo Farms Co., supra, 134 Cal. App. 268, 276.) [9] The fees recoverable must be a reasonable incident of the suit, proximately and directly resulting from the action. That recovery for such services should not be disallowed merely because performed before the action was filed was indirectly recognized in the case of State of California v. Westover Co., supra, 140 Cal. App.2d 447. In upholding an award of $150,000 fees in that case the court listed the services performed by defendant's attorney, and included certain services performed before the complaint was filed (pp. 451-455).
The problem is one of statutory interpretation. Can, and should, the phrase "reasonable attorney fees," as used in section 1255a, be interpreted to include fees the obligation to pay for which was incurred by defendant for services rendered before the complaint was filed, but rendered in contemplation of and in preparation for the expected trial? [10] While section 1255a is in derogation of the common law it must be fairly interpreted to accomplish its purposes. Section 4 of the Code of Civil Procedure provides: "The rule of the common law, that statutes in derogation thereof are to be strictly construed, has no application to this code. The code establishes the law of this state respecting the subjects to which it relates, and its provisions and all proceedings under it are to be liberally construed, with a view to effect its objects and to promote justice." The provisions of section 1255a must be interpreted with the mandate of section 4 in mind.
It must be kept in mind that attorney's fees in a condemnation action are in a different category from those in other *317 actions. Eminent domain, so far as the defendant is concerned, is not based upon any activity on his part. There is no voluntary element in such an action. When the public agency announces its intention to take his property, it is telling the owner that he must sell his property whether he wants to or not. (See City of Sacramento v. Swanston, 29 Cal. App. 212, 220 [155 P. 101]; 1 Nichols, Eminent Domain (3d ed. 1950) p. 368.) Faced with such a threat, any reasonably prudent property owner would retain an attorney to protect his interests, even before the filing of suit. The careful lawyer, to adequately represent his client in this stage of negotiations, will perform many services which will be helpful and necessary if a complaint is filed and the case goes to trial. The condemnation defense lawyer, for both trial and pretrial negotiations, must acquire a working knowledge not only of the legal principles involved, but also of local real estate practices, appraisal theories and engineering techniques. (Huxtable, Trial Preparation, Discovery, Pretrial, and Jury Instructions, California Condemnation Practice (Cont. Ed. Bar) p. 223 at p. 227.) Almost necessarily, whether suit has been filed or not, he must inspect the property, prepare demonstrative evidence, look up the applicable law and engage in conferences with appraisers and lay witnesses in an effort to ascertain land use and value. (See State of California v. Westover Co., supra, 140 Cal. App.2d 447, at p. 454; O'Neill, The Appraisal, California Condemnation Practice (Cont. Ed. Bar) p. 23 at p. 35; Huxtable, Trial Preparation, etc., supra, at pp. 231-232.) If these services are rendered after the filing of suit they clearly are recoverable. (See State of California v. Westover Co., supra.) Of course, if suit is never filed the land owner would have to pay the fees of his attorney, because it is only in the event suit is filed that attorney fees are recoverable. If suit is not filed the landowner must pay the price of his diligence in protecting his property. But if suit is filed, there is no sound reason why the trial court should exclude these prior services in determining a reasonable fee merely because performed before the action is commenced. The statute contemplates reimbursement for the attorney's fees reasonably incurred in preparing for trial. It would be ridiculous to require the attorney to repeat formally all of this work after the complaint is filed in order to protect his client's rights under section 1255a in the event of an abandonment.
[11] For these reasons, in the event of abandonment, *318 section 1255a, properly interpreted, permits attorney's fees to be allowed for services rendered in connection with the proposed taking whether those services are rendered before or after the filing of the action, provided only that they are the type of services that are reasonably necessary to protect the defendant's interests at the expected trial. The plaintiff should not escape liability because of the defendant's foresight and the fortuitous dates upon which the suit and the notice of abandonment happened to be filed. Plaintiff could have avoided assessment of costs by not filing the suit. Having done so, without prosecuting the suit to its conclusion, plaintiff has brought itself within the provisions of section 1255a and must now pay the penalty imposed by that section.
[12] Of course, the defendant cannot recover any fees of his attorney incurred in connection with the proposed taking of his property unless such fees were incurred in preparation for the defense of the action. It is only those services rendered in preparation for the trial of the proposed action that are recoverable. It is for the trial court to determine what services were rendered in preparation for trial and the reasonable value of such services.
The order of the trial court as to appraisal fees is affirmed; the order in reference to attorney's fees is reversed with instructions to the trial court to determine the reasonable value of such fees incurred in preparation for trial in accordance with the views expressed in this opinion. Defendant to recover his costs on this appeal.
Gibson, C.J., Traynor, J., Schauer, J., McComb, J., White, J., and Dooling, J., concurred.
NOTES
[1]  The applicable portion of section 1255a as amended in 1961 (§ 9, subd. (c), Stats. 1961, ch. 1613, p. 3442 at p. 3449) reads:

"(c) Upon the denial of a motion to set aside such abandonment or, if no such motion is filed, upon the expiration of the time for filing such a motion, on motion of any party, a judgment shall be entered dismissing the proceeding and awarding the defendants their costs and disbursements, which shall include all necessary expenses incurred in preparing for trial and during trial and reasonable attorney fees. These costs and disbursements, including expenses and attorney fees, may be claimed in and by a cost bill, to be prepared, served, filed and taxed as in civil actions; provided, however, that upon judgment of dismissal on motion of plaintiff, defendants, and each of them, may file a cost bill within 30 days after notice of entry of such judgment; that said costs and disbursements shall not include expenses incurred in preparing for trial where the action is dismissed 40 days or more prior to the time set for the pretrial conference in the action or, if no pretrial conference is set, the time set for the trial of the action."
Although this case was on appeal at the effective date of the 1961 amendments, they are apparently applicable (Stats. 1961, ch. 1613, § 11, p. 3451). Moreover, the 1961 amendments did not change the pertinent provisions of the statute applicable to the problems here presented.
