
148 Cal.App.3d 654 (1983)
196 Cal. Rptr. 174
FISH CONSTRUCTION CO., INC., Plaintiff and Respondent,
v.
MOSELLE COACH WORKS, INC., et al., Defendants and Appellants.
Docket No. 69006.
Court of Appeals of California, Second District, Division One.
November 2, 1983.
*656 COUNSEL
Stanley H. Getz for Defendants and Appellants.
Adelman & Schwartz and Milton M. Adelman for Plaintiff and Respondents.
*657 OPINION
DALSIMER, J.
Defendants, as lessees of plaintiff, appeal from the judgment awarding plaintiff the sum of $20,500, plus $1,200 attorney's fees, $157 costs, restitution of certain commercial premises, and a forfeiture of the written lease on said premises. Defendants contend that there is insufficient evidence to support the trial court's implied finding that defendants had not relinquished possession of the premises. That being so, they contend that they were denied the opportunity to present evidence on their pleaded affirmative defense that the leased premises were not maintained in a safe and secure manner and on their pleaded denial that plaintiff had performed all covenants of the lease agreement. We agree and reverse.
The action against defendants was commenced as an unlawful detainer proceeding based on the failure of defendants to pay rent when due under a four-year written lease. Defendants answered, and the case was given a preferential trial date as required by Code of Civil Procedure section 1179a.
The defendants' answer admitted that the rent claimed to be due in the three-day notice to pay rent or quit was in fact due and that the defendants had not paid the rent since the unlawful detainer complaint was filed. The answer also admitted defendants were still in possession of the property.
Defendants claimed to have vacated the leased premises one day before trial and to have delivered the keys to plaintiff's lawyer with a letter advising plaintiff that defendants no longer claimed possession of the premises. Plaintiff's lawyer admitted having received the keys and the letter on the day before trial, but told the court he wasn't certain whether the keys were those for the leased premises.
The defendants offered no direct evidence that the premises were vacant. The plaintiff's president, when told by his lawyer of the receipt of the keys and of the statements contained in defendants' letter, testified that he did not go to the premises to see if they had been vacated.
The trial court, in its judgment restoring possession to plaintiff, impliedly found that defendants had not relinquished possession the day prior to trial, and therefore by law the court was not permitted to consider the defenses that plaintiff had not performed an express covenant of the lease and that the premises had not been maintained in a safe and secure manner. Defendants' request for a statement of decision was denied because the trial lasted less than one day and no request for such a statement had been made prior to submission of the case for decision. (Code Civ. Proc., § 632.)
*658 Before commencement of trial, defendants had requested that the matter be placed off calendar and reset as an ordinary civil case because possession had been restored to the lessor. Defendants' motion was denied by the trial judge.
(1) An unlawful detainer action is a summary proceeding; calendar precedence is given, and only the right to possession is in issue. (Moskovitz et al., Cal. Eviction Defense Manual (Cont.Ed.Bar 1971) Summary of Unlawful Detainer Procedure, ch. 2, p. 4.) To preserve the summary nature of these proceedings, the rule developed that ordinarily affirmative defenses may not be asserted. (Union Oil Co. v. Chandler (1970) 4 Cal. App.3d 716, 721 [84 Cal. Rptr. 756].) Only defenses which are directly relevant to possession may be considered. (Green v. Superior Court (1974) 10 Cal.3d 616, 632-634 [111 Cal. Rptr. 704, 517 P.2d 1168].)
(2) The defense of implied warranty of habitability is not applicable to unlawful detainer actions involving commercial tenancies. (Schulman v. Vera (1980) 108 Cal. App.3d 552, 558-563 [166 Cal. Rptr. 620].) For a commercial tenant to maintain an action against a commercial landlord for breach of a lease provision such as a covenant to repair or maintain the premises, the tenant must bring a separate action. Such a tenant cannot defend an unlawful detainer action based on nonpayment of rent by claiming the landlord breached an express covenant to repair. (Ibid.)
(3) If the tenant gives up possession of the property after the commencement of an unlawful detainer proceeding, the action becomes an ordinary one for damages. (See Green v. Superior Court, supra, 10 Cal.3d 616, 633, fn. 18.) This is true where possession is given up "before the trial of the unlawful detainer action." (See ibid.) Civil Code section 1952.3, subdivision (a), codifies this rule with some procedural guidelines and provides that delivery of possession of the leased property converts an unlawful detainer proceeding into an ordinary civil case. (Karz v. Mecham (1981) 120 Cal. App.3d Supp. 1 [174 Cal. Rptr. 310].)
(4a) The key issue in the case at bar is whether evidence was presented sufficient to compel a finding that defendants had vacated the premises and relinquished possession. If the defendants did not relinquish possession, then the action was one in unlawful detainer, and, by law, defendants could not present their affirmative defense or their defense based on their denial that plaintiff performed under the written lease. If, however, the defendants did relinquish possession before trial, then the case became an ordinary civil action, and reversal is required to enable the tenants to present their defenses.
*659 As previously mentioned, evidence was presented indicating that the keys to the leased property were delivered to the plaintiff's lawyer along with a letter stating that defendants relinquished possession. This evidence was not rebutted. Plaintiff apparently felt it was unnecessary to present any evidence on the possession issue because the defendants had admitted in their answer to the complaint that they were withholding possession. (5) Unfortunately for plaintiff, Civil Code section 1952.3 gave defendants the right to establish that possession had been relinquished despite their pleaded admission to the contrary. The underlying purpose of Civil Code section 1952.3 is to accord a full trial to a tenant who has relinquished possession of the contested premises at any time before trial because, once possession has been delivered to the landlord, the need for a summary proceeding no longer exists.
(4b) Defendants' uncontroverted evidence that the keys were delivered to plaintiff's lawyer along with a letter relinquishing possession required the trial court to find, absent contrary evidence, that possession was no longer an issue. Plaintiff made no effort to proffer such contrary evidence. Civil Code section 1952.3, subdivision (a), provides that "if the lessor brings an unlawful detainer proceeding and possession of the property is no longer in issue because possession of the property has been delivered to the lessor before trial ... the case becomes an ordinary civil action...." (Italics added.) As the defendants satisfied this time requirement, the trial court's implied finding that possession was not relinquished had no support in the evidence. The evidence compelled a finding to the contrary.
Civil Code section 1952.3 provides that, if possession of the property has been delivered to the lessor before trial, "The defendant may, by appropriate pleadings or amendments to pleadings, seek any affirmative relief, and assert all defenses, to which he is entitled...." The statutory scheme of which section 1952.3 is a part contemplates that, when it is ascertained that possession is no longer an issue, upon proper motion the defendant is entitled to have the matter continued or placedoff calendar to enable him to prepare pleadings seeking relief or asserting affirmative defenses not cognizable in an unlawful detainer proceeding and to gather evidence to establish those defenses or the right to such relief. It might appear at first blush that the Legislature did not intend for a continuance to be available because of the statement in subdivision (b) of Civil Code section 1952.3 that "The defendant's time to respond to a complaint for unlawful detainer is not affected by the delivery of possession of the property to the lessor...." It is necessary, however, that Civil Code section 1952.3 be read in harmony with the requirement of Code of Civil Procedure section 1179a that unlawful detainer actions be given special preference over ordinary civil actions in *660 calendaring. As we have mentioned ante at page 659, the action is converted to an ordinary civil action whenever possession has been given up before trial. In the case at bar, defendants had denied plaintiff's performance and pled an affirmative defense, and, since possession had been relinquished, they should have been given additional time within which to gather the evidence needed to assert those defenses.
(6) We hold that, once possession has ceased to be an issue because of delivery of possession to the lessor within the period prescribed by Civil Code section 1952.3, the action having been converted to an ordinary civil action, the lessee is entitled to have the matter continued or placed off calendar to enable him to prepare for trial so that he may assert appropriate defenses or seek affirmative relief that would not have been available in an unlawful detainer proceeding. A contrary decision would defeat the clear statutory policy that only those actions in which possession remains an issue are entitled to calendar preference as unlawful detainer proceedings and that, once possession has ceased to be an issue, the matter shall proceed as an ordinary civil action.
The judgment is reversed, and the matter is remanded for proceedings consistent with this opinion. On remand, the parties may upon proper motion amend their pleadings as permitted by Civil Code section 1952.3.
Hanson (Thaxton), Acting P.J., and Fainer, J.[*], concurring.
A petition for a rehearing was denied November 22, 1983, and respondent's petition for a hearing by the Supreme Court was denied January 25, 1984.
NOTES
[*]   Assigned by the Chairperson of the Judicial Council.
