
53 Cal.Rptr.3d 491 (2007)
146 Cal.App.4th 1296
Mike VAN SLYKE, Plaintiff and Appellant,
v.
Oliver E. GIBSON, Jr., et al. Defendants and Respondents.
No. B185339.
Court of Appeal of California, Second District, Division Six.
January 18, 2007.
*492 Alan W. Courtney, Santa Ynez, for Plaintiff and Appellant.
John Derrick, Santa Barbara, for Defendants and Respondents.
GILBERT, P.J.
In a real estate transaction dispute, defendants file a cross-complaint against plaintiff and his real estate broker. Before trial, defendants dismiss plaintiff from their cross-complaint and the trial court severs their cross-complaint. Defendants prevail at trial. The real estate purchase agreement disallows attorney fees to a prevailing party who does not first attempt mediation before filing an action. Here, defendants are not required to seek mediation prior to recovery of their attorney fees.
Mike Van Slyke appeals an order awarding $94,974 attorney fees plus costs to Oliver E. Gibson, Jr. and Joni Ruth Gibson. We affirm.

FACTS AND PROCEDURAL HISTORY
On May 8, 2004, Van Slyke made a written offer to purchase 23 acres of undeveloped property located at 2222 Richview Road in Santa Maria, owned by the Gibsons. The offer provided for a 90-day escrow and the obtaining of financing for most of the purchase price of $875,000.
On May 10, 2004, the Gibsons made a counter-offer with an $899,000 purchase price and a 30-day escrow. The counteroffer also stated: "Upon acceptance, buyer to provide prequalification letter from lender, as well as written confirmation from lender that they will loan on acreage with existing modular home." Van Slyke accepted and executed the counter-offer, but did not provide the lender prequalification and confirmation letters. Consequently, on May 17, 2004, the Gibsons accepted an all-cash purchase offer of $899,000 from David Daniels and Jennifer Daniels.
On June 1, 2004, Van Slyke brought an action for breach of contract and specific performance against the Gibsons. The Daniels also brought a separate action for specific performance against the Gibsons. Van Slyke and the Daniels filed separate lis pendens against the Richview Road property.
On July 8, 2004, the Gibsons filed a cross-complaint in the Van Slyke action, *493 against Van Slyke and his realtor, Monika Draggoo. The Gibsons alleged causes of action for intentional and negligent interference with an economic relationship. Two months later, the Gibsons dismissed Van Slyke from the cross-complaint. The trial court later severed the cross-complaint from the Van Slyke action.
The trial court consolidated the Van Slyke and Daniels specific performance actions for trial. Following trial, the court decided that Van Slyke did not accept the counter-offer because he did not provide a lender's written confirmation letter. The trial court found that the Daniels "came in front of this court with pristine hands [but] Van Slyke['s] couldn't get any dirtier." The trial court also found that Van Slyke's $10,000 deposit check "was an N.S.F. check." The court granted specific performance to the Daniels.
The Gibsons then sought their attorney fees to defend the Van Slyke action, pursuant to the "California Residential Purchase Agreement" attorney fee provisions. Van Slyke responded that the Gibsons did not attempt to mediate the dispute prior to filing their cross-complaint. He relied upon Paragraph 17(A) of the agreement, providing: "Buyer and Seller agree to mediate any dispute or claim arising between them out of this Agreement, or any resulting transaction, before resorting to arbitration or court action.... If, for any dispute or claim to which this paragraph applies, any party commences an action without first attempting to resolve the matter through mediation, or refuses to mediate after a request has been made, then that party shall not be entitled to recover attorney fees, even if they would otherwise be available to that party in any such action." The Gibsons replied that their attorney telephoned Van Slyke's attorney and requested mediation prior to filing the cross-complaint, but Van Slyke's attorney refused. They added that they were seeking fees only for the defense of the Van Slyke action, not for prosecution of the severed cross-complaint.
The trial court awarded the Gibsons $94,974 attorney fees plus costs. Van Slyke appeals and contends that the Gibsons' failure to offer mediation of the cross-complaint precludes the attorney fee award.

DISCUSSION
Van Slyke argues that insufficient evidence supports the implied finding of the trial court that the Gibsons proposed mediation prior to filing their cross-complaint. He asserts that the declaration of the Gibsons' attorney that he offered to mediate the dispute is insubstantial evidence. Van Slyke points out that we independently review the legal basis for an attorney fee award. (Blackburn v. Charnley (2004) 117 Cal.App.4th 758, 767, 11 Cal.Rptr.3d 885.)
We review the determination of an award of attorney fees de novo as a question of law. (Blackburn v. Charnley, supra, 117 Cal.App.4th 758, 767, 11 Cal. Rptr.3d 885 [attorney fees pursuant to California Residential Purchase Agreement].) The parties' real estate purchase agreement provides that in any action between the buyer and seller, the prevailing party is entitled to recover attorney fees, unless that party brought the action without first attempting to mediate the dispute. (Johnson v. Siegel (2000) 84 Cal.App.4th 1087, 1100, 101 Cal.Rptr.2d 412.) "Seeking mediation is a condition precedent to the recovery of attorney fees by the party who initiates the action." (Id., at p. 1101, 101 Cal.Rptr.2d 412.)
Here the Gibsons sought their attorney fees for defense of the Van Slyke action, not for prosecution of the cross-complaint. *494 The Gibsons had dismissed Van Slyke as a defendant in the cross-complaint, and the trial court severed the cross-complaint from the lawsuit that Van Slyke initiated. (Omni Aviation Managers, Inc. v. Municipal Court (1976) 61) Cal.App.3d 682, 684, 131 Cal.Rptr. 758 [severance of cross-complaint from complaint results in two actions pending].) Civil Code section 1717 permits an award of attorney fees `"even when the party prevails on grounds the contract is ... nonexistent, if the other party would have been entitled to attorney's fees had it prevailed.' [Citations.]" (Hsu v. Abbara (1995) 9 Cal.4th 863, 870, 39 Cal.Rptr.2d 824, 891 P.2d 804.) Therefore, the Gibsons did not have to seek mediation.
In any event, the Gibsons' attorney declared that he telephoned Van Slyke's attorney and proposed arbitration and mediation of the dispute, but was rebuffed. Moreover, in a pretrial brief, the Gibsons confirmed that they offered arbitration and mediation to Van Slyke, but he rejected these alternatives. The trial court determines the weight of evidence and the credibility of a declarant in matters submitted upon declarations. (Brunzell Construction Co., Inc. v. Smith (1988) 200 Cal. App.3d 617, 620, 246 Cal.Rptr. 182.)
The Gibsons are also entitled to an award of attorney fees on appeal, in an amount to be determined by the trial court. (Los Angeles Times v. Alameda Corridor Transportation Authority (2001) 88 Cal.App.4th 1381, 1393, 107 Cal.Rptr.2d 29.)
The order is affirmed. Costs to respondents.
We concur: YEGAN and PERREN, JJ.
