The question presented on this appeal is whether the respondent superior court abused its discretion by denying petitioner leave to file a cross-complaint in an action for damages for personal injuries and property damage. We have concluded that the court did abuse its discretion under the circumstances hereinafter set forth, and that a peremptory writ of mandate should issue to compel the filing of the proposed pleading.
On April 14, 1967 an action was filed against petitioner and his wife seeking damages for personal injuries resulting from an automobile accident. The complaint alleged that on February 22, 1967 plaintiffs were proceeding in a northerly direction on the Warren Freeway in Oakland when they were struck from behind by a vehicle owned and operated by petitioner. Petitioner and his wife filed an answer on June 6, 1967, alleging as a defense that the vehicle occupied by plaintiffs made a U-turn across the freeway divider and proceeded directly into their path.
Following the filing of the answer, discovery proceedings were commenced, and the depositions of plaintiffs and an independent witness to the accident were taken. The witness’ testimony corroborated petitioner’s defense. Plaintiffs did not seek petitioner’s deposition, and petitioner and his wife had no communication with their counsel and took no further action on the case during 1967. Petitioner, during that time, attempted to negotiate a direct settlement with plaintiffs’ insurance carrier, but his attempts were unsuccessful.
On February 26, 1968 attorneys for petitioner received a letter from petitioner’s wife advising them that petitioner had sustained personal injuries, medical expenses, loss of earnings and property.damage as a result of the accident in *574 question. The letter acknowledged that it was “quite late,” but explained that defendants “kept hoping that after the deposition that the American Automobile Association would realize that their client, Mr. Houff, was at fault and would make a settlement, and that we would not have to sue . . . but it looks as if we have to.” The letter then requested the attorneys to ‘ ‘ represent us in our suit. ’ ’
On March 1, 1968 the respondent court mailed a notice of trial setting conference to counsel. The conference was scheduled for May 6, 1968. Thereafter attorneys for petitioner communicated with attorneys for plaintiffs by telephone and requested them to stipulate to the filing of a cross-complaint on petitioner’s behalf. Attorneys for plaintiffs agreed to so stipulate, but indicated that they would prefer the request to be made by letter in order to maintain a proper record. Accordingly, on April 24, 1968, attorneys for petitioner requested the stipulation by mail. Attorneys for plaintiffs, by letter dated April 29, 1968, responded that they had no objection to the filing of a cross-complaint and would be willing to so stipulate.
The trial setting conference was held on May 6, 1968, as previously scheduled. Neither petitioner nor his attorneys appeared. At that time trial was set for July 24,1968.
On May 7, 1968 counsel for petitioner mailed the stipulation regarding the filing of the cross-complaint to plaintiffs’ attorneys. On May 16, 1968 attorneys for plaintiffs, claiming “oversight” and “error,” withdrew their consent to said stipulation. Thereafter, on May 27, 1968, petitioner’s attorneys noticed a motion before respondent court to allow the filing of a cross-complaint for personal injuries and property damages resulting from the accident. This motion came on for hearing on June 18, 1968, at which time the trial judge requested that petitioner submit medical reports of his injuries and an itemization of the expenses alleged to have been incurred as a result of the accident. Pursuant to this request, petitioner submitted, on June 20, 1968, a copy of the medical report and bill received by petitioner from his treating physician, and a declaration of petitioner and his attorney relating to the reasons for delay in seeking the cross-complaint. The trial judge thereupon took the motion under submission.
On July 12, 1968 petitioner filed a notice of motion for continuance of trial. The motion came on for hearing on July 22, 1968 before the same judge who had heard the motion for leave to file a cross-complaint, at which time he informed *575 counsel that petitioner’s motion to file a cross-complaint had been denied by minute order dated July 19, 1968. The court advised counsel that denial of the motion was based on findings that petitioner’s attorneys were dilatory in seeking court intervention, that petitioner was negligent in failing to advise his attorney that he desired to cross-complain, and that the cross-complaint was without merit.
Adverting to the question presented, we first note that petitioner’s pleading, although designated as a cross-complaint, seeks to assert a claim which could have been pleaded as either a counterclaim or a cross-complaint. (See
Schrader
v.
Neville,
It should also be noted that the claim asserted by petitioner comes within the ambit of section 439 which provides: “If the defendant omits to set up a counterclaim upon a cause arising out of the transaction set forth in the complaint as the foundation of the plaintiff’s claim, neither he nor his assignee can afterwards maintain an action against the plaintiff therefor.”
(Schrader
v.
Neville, supra,
With respect to cross-complaints, we also note the rule that a defendant may file a cross-complaint at the time of answering, but thereafter it may only be done by permission of the court; and that the ruling of the trial court on an application for permission to file such a pleading is within its discretion and will be reversed only upon a showing that such
*576
discretion was abused.
(Nels E. Nelson, Inc.
v.
Tarman,
With respect to the amendment of pleadings there has developed in this state a policy of great liberality in allowing amendments at any stage of the proceeding so as to dispose of cases upon their substantial merits where the authorization does not prejudice the substantial rights of others.
(Hayutin
v.
Weintraub, supra,
Although the policy of liberality is firmly entrenched in ease law, it is tempered by the rule that the trial court’s decision must be upheld unless there is a clear abuse of discretion.
(Hayutin
v.
Weintraub, supra,
Adverting to the instant case, we deem it proper, to the end that substantial justice may be done, to treat the subject pleading as a counterclaim so as to bring into play the rule of liberality applicable to the amendment of pleadings. We are impelled to do so because petitioner’s claim is deemed a counterclaim under section 439 which effectively bars the claim unless the filing of the pleading is permitted.
In deciding whether to uphold denial of a request to amend a pleading, California courts have focused attention on two aspects of the case: the subject matter of the proposed amendment, and the conduct of the parties. As aptly stated in
Landis
v.
Superior Court, supra,
*578 With regard to the subject matter of the proposed pleading in the present case, the trial court found it to be “without merit.” A review of the record, however, reveals no basis for such a determination, since the pleading is sufficient, as either a cross-complaint or counterclaim, to establish a cause of action in negligence. All the necessary elements for such an action are alleged, to wit: (1) that plaintiffs owed a duty of care toward defendant; (2) that plaintiffs breached that duty; (3) that defendant was injured as a result of the breach; and (4) that defendant incurred damage as a result of the breach. Moreover, petitioner alleged, in support of his motion, that he, his wife, and an independent witness will testify to plaintiffs’ negligence at the time of the accident. This allegation was not controverted. We conclude, therefore, that the proposed pleading does not raise a disfavored plea.
The question of the propriety of the trial court’s order becomes more difficult when the conduct of the parties is considered. It is stated in 2 Witkin, California Procedure (1954) page 1608, that “The cases [denying leave to amend] do not always make it clear whether they rest upon (1) the subjective element of lack of diligence in discovering the facts or in offering the amendment after knowledge of them, or (2) the effect of the delay on the adverse party. But in most cases both factors are involved. ’ ’ In
Landis,
the reviewing court after pointing out that most cases which uphold the trial court’s denial of a motion to amend involve motions noticed at a late stage of the proceeding, usually at or just before trial, makes this pertinent statement: “. . . it seems unreasonable to deny a party the right to amend where the only apparent hardship to the defendants is that they will have to defend.” (
Plaintiffs do not allege harm from the fact that the pro
*579
posed cross-complaint or counterclaim might be allowed. The counterclaim was essentially based on facts already pleaded by petitioner and his wife as a defense in their answer. The only possible hardship might be a postponement of the trial, although such a postponent may not be necessary if the proposed pleading is deemed a counterclaim, since no response is needed to a counterclaim.
(Edgar Rice Burroughs, Inc.
v.
Commodore Productions & Artists Inc.,
Petitioner’s delay in seeking the cross-complaint, furthermore, is neither unexplained nor unexcused. Petitioner filed his answer to the complaint on June 6, 1967. The attorneys engaged to defend him in that action were then apparently employed only to defend the case. The settlement negotiations for his injuries were undertaken by petitioner himself. On February 26, 1968, some eight months after the answer had been filed, when it became apparent that no settlement could be reached, petitioner directed his attorneys in the present action to bring suit against plaintiffs.
4
Based upon the well-established policy of law that favors the avoidance of litigation by compromise, cases similar to the one at bench have held that delays caused by such negotiations are excusable.
(Jepson
v.
Sherry, supra,
When the settlement negotiations failed, petitioner’s attorneys sought a stipulation from plaintiffs’ attorneys for the filing of the cross-complaint. Pursuant to this request plaintiffs’ attorneys agreed to enter into such a stipulation. At the trial setting conference of May 6, 1968, at which petitioner’s attorneys did not appear, plaintiffs’ attorneys apparently did *580 not advise the court of the fact that they had previously agreed to enter into a stipulation for the filing of a cross-complaint, although under the circumstances it was incumbent upon them to do so. Instead, they permitted the trial court to set the case for trial on July 24, 1968. On May 16, 1968, plaintiffs’ attorneys reneged on their agreement to enter into the stipulation. Petitioner was therefore left no choice but to seek court assistance. Accordingly, he filed the instant motion which was noticed for hearing almost two months before the date set for trial.
Under the foregoing circumstances it cannot be contended that the period elapsing between the request for the stipulation and its repudiation should be charged to petitioner. As to the remaining 10-month period, approximately 8 months are reasonably accounted for and excused since they were consumed by settlement negotiations. Accordingly, there remains two months which are unaccounted for, i.e., those months elapsing between the time petitioner retained his attorneys to bring a eountersuit and the time they requested the stipulation. In the light of the policy of the law seeking the determination of causes on their merits, we cannot saj^ that this delay amounts to a lack of due diligence.
It should be noted here that in
Landis
the court stated that no California decision has upheld the denial of a motion to amend based solely on the fact that a party lacked diligence at a stage of the proceeding before trial or pretrial had been set. The facts of the present ease indicate that petitioner sought relief well before trial date was set. The fact that the actual motion was made
after
trial was set was due to the refusal of plaintiffs’ attorneys to accept the stipulation. Since plaintiffs’ attorneys were largely to blame for the delay, they should not be allowed, in this proceeding, to take advantage of their adversary’s unfortunate position. “ ‘In view of the policy of the law to have every litigated case tried on its merits, courts look with disfavor on a party who, regardless of the merits of his case, attempts to take advantage of the mistake, surprise, inadvertence, or neglect of his adversary.’ ”
(Luther
v.
Foster,
The denial of petitioner’s motion, furthermore, unreasonably penalizes petitioner for any lack of diligence on his part. His counterclaim is compulsory and must be filed in the present action. If it is not filed, petitioner’s cause of action is barred forever. In view of the policy in favor of *581 allowing issues to be fully litigated, and because the trial court’s order, if upheld, would deny petitioner his day in court, said order does not tend to subserve, but rather to impede or defeat, the ends of substantial justice. 5 For this and other reasons noted above, the order should be vacated.
Let a peremptory writ of mandate issue requiring the respondent court to make and enter its order granting leave to petitioner to file the proposed cross-complaint tendered by him as an amendment to the answer by way of a counterclaim.
Sims, J., and Elkington, J., concurred.
Notes
Unless otherwise indicated, all statutory references are to the Code of Civil Procedure.
Examples of eases upholding the denial of leave to file a cross-complaint and denial of leave to amend are as follows:
Scholle
v.
Finnell
(1914)
See, for example,
Anderson
v.
Perminter, supra,
These allegations in petitioner’s affidavit are uneontradieted and therefore must he taken as true.
In
Landis
v.
Superior Court, supra,
