
167 Cal.App.2d 408 (1959)
FONTANA INDUSTRIES, INC. (a Corporation), Appellant,
v.
WESTERN GRAIN AND FERTILIZER COMPANY (a Corporation) et al., Respondents.
Civ. No. 5901. 
California Court of Appeals. Fourth Dist.  
Jan. 28, 1959.
 Trent G. Anderson, Jr., for Appellant.
 Thomas M. Eckhardt and Borton, Petrini, Conron & Brown for Respondents.
 MUSSELL, Acting P. J.
 This is an action for unlawful detainer and for damages. The first amended complaint contains two causes of action. In the first cause of action plaintiff alleges, among other matters, that on or about November 1, 1954, plaintiff and defendant Western Grain and Fertilizer Company, Inc., entered into a written agreement wherein plaintiff, as owner, leased to said defendant approximately 60 acres of the property commonly known as Fontana Farms, in San Bernardino County; that the lease was for a period of five years at an agreed rental per year and lessee agreed to pay the taxes; that it was further agreed that "... in the event the lessee abandons the premises or should the lessee default in any of the covenants herein contained, the lessor at his option may reenter and take possession of the premises and remove all persons and property thereto, and at his option terminate this lease"; that it was further provided that lessor acknowledges that certain items of fixtures were sold to the Kern Valley Packing Company; that lessee warrants that it is entitled to remove such items as were sold to the Kern Valley Packing Company primarily including the feed mill on the leased premises, and lessor consents to the removal of such items thus sold at any time during the terms of the lease. It is further alleged that defendant Western defaulted in the payments in the sum of $8,625; that plaintiff is informed and believes and therefore alleges that defendants have abandoned said premises in their entirety, and did so abandon said premises on or about the 30th day of March, 1956; that there are certain buildings, property of lessee, *410 now located on said premises, consisting of a grain elevator building and of certain incidental structures and fence posts; that defendant Western has not removed said buildings and that the cost of removing them is the approximate sum of $15,000; that in said lease it is provided that lessee agrees to remove all rubbish from the premises; that the aforesaid grain elevator has partially burned and is therefore useless and that the expense of removing it is approximately $15,000.
 The second cause of action, which relates a transaction antedating the foregoing by several years, is against the defendants Kern Valley Packing Company and Oscar Rudnick. Plaintiff alleges that on or about November 24, 1951, plaintiff was the owner of all the fixtures, buildings and equipment located on the real property described in the first cause of action; that plaintiff's assignors entered into a written agreement of sale with defendant Kern whereby said defendant purchased the fixtures located on said premises, including a grain elevator, grinding mill, with hog pens, runways and fence posts; that in said agreement defendant Kern agreed to accomplish the removal of all of said improvements within five months from the close of escrow and to leave the premises in an orderly and clean condition; that escrow was entered into between the parties, the purchase price of said buildings was paid and the escrow was closed on or about February 5, 1952; that more than five months have gone by since the close of said escrow, but defendant Kern has failed and neglected to remove the grain elevator and certain fence posts and other buildings incidental to said elevator, and that plaintiff was damaged thereby in the sum of $15,000.
 The prayer of the complaint is for judgment against Western for unpaid rental and personal property taxes, for restitution and possession of the premises, for attorney's fees, and for $15,000 for cost of removal of rubbish from the premises. Judgment is sought against Kern and Rudnick in the sum of $15,000 as the reasonable cost of removing the fixtures and equipment as alleged in the second cause of action.
 The pretrial conference order herein shows that plaintiff's statement is that the instant action is an unlawful detainer action and an effort by the lessor to regain possession of the premises demised; that in the second cause of action the sale of the personal property to Kern Valley Packing Company included a clause requiring the removal of the property and in this cause of action damages are sought against the Kern *411 Valley Packing Company for plaintiff's alleged costs in removing the personal property.
 At the close of plaintiff's case the trial court granted a nonsuit and plaintiff appeals from the judgment which was then entered.
 [1] The statutory unlawful detainer proceedings are summary in nature. They are designed to determine or protect the landlord's right to possession in those situations specified in the statute (Code Civ. Proc.,  1161) and cannot be used for any other purpose (30 Cal.Jur.2d,  348, p. 487.)
 In Markham v. Fralick, 2 Cal.2d 221, 227 [39 P.2d 804], the court said: "The primary purpose of such an action is for the recovery of the possession of the property. The recovery of rent is a mere incident to the main object. (Arnold v. Krigbaum, 169 Cal. 143, 146 [146 P. 423, Ann. Cas. 1916D 370].) When the main object of the action fails, the incidents fall with it."
 [2] In Garfinkle v. Montgomery, 113 Cal.App.2d 149, 153 [248 P.2d 52], the court said:
 "The summary remedy of unlawful detainer is primarily designed to recover possession from the defaulting lessee. As incidental to the main object the court under section 1174 of the Code of Civil Procedure assesses damages and determines the rent due. (Markham v. Fralick, 2 Cal.2d 221 [39 P.2d 804]; D'Amico v. Riedel, 95 Cal.App.2d 6 [212 P.2d 52].) [3] In an unlawful detainer action where the lessee remains in possession or deprives the lessor of possession until the rendition of judgment the allowance of rental to the date of judgment is proper. (Keyes v. Moy Jin Mun, 136 Cal. 129 [68 P. 476]; Flournoy v. Everett, 51 Cal.App. 406 [196 P. 916].) [4] However, if the lessor enters into and assumes full control of the premises during the pendency of the action and it cannot be said that such assumption of control is for the account of the lessees under appropriate provisions of the lease or circumstances justifying such a declaration, then such entry constitutes an eviction and liability for rent is thus terminated."
 [5] In the instant case the record shows that the defendant Western Grain and Fertilizer Company abandoned the premises involved about March 30, 1956, and it is alleged by plaintiff in its first amended complaint "that defendants have abandoned said premises in their entirety and did so abandon said premises on or about the 30th day of March, 1956." The *412 complaint herein was filed on July 25, 1956. There is no pleading or proof that defendant Western was in possession of the property at the time the action was filed or that said defendant wrongfully or otherwise withheld possession of the property from plaintiff at that time. The record further shows that plaintiff finally removed the fixtures involved in April, 1957, and there was no evidence indicating that plaintiff was prevented from taking possession of the property in March, 1956, or prior thereto. Under these circumstances a judgment of nonsuit was proper as to the first cause of action in unlawful detainer.
 [6] Plaintiff's second cause of action is for damages for the breach of a contract by respondents Kern Valley Packing Company and Oscar Rudnick, who agreed therein to remove the fixtures involved within five months after close of escrow. The record shows that the escrow was closed on February 5, 1952, and the complaint herein was filed July 5, 1956, more than four years after the alleged breach of the contract. Respondents pleaded the statute of limitations and the record shows that the second cause of action in the complaint was barred by the statute. (Code Civ. Proc.,  337, subd. 1.)
 Judgment affirmed.
 Shepard, J., and Stone, J. pro tem.,  [fn. *] concurred.
NOTES
[fn. *]  *. Assigned by Chairman of Judicial Council.
