
153 Cal.App.3d 858 (1984)
200 Cal. Rptr. 661
SCOTT PENNER, Plaintiff and Appellant,
v.
JOE FALK et al., Defendants and Respondents.
Docket No. 69318.
Court of Appeals of California, Second District, Division Four.
March 28, 1984.
*860 COUNSEL
Fogel, Rothschild, Feldman & Ostrov, J. Clark Aristei and Allan J. Favish for Plaintiff and Appellant.
Grace, Neumeyer & Otto and Ilse A. Harle for Defendants and Respondents.
OPINION
AMERIAN, J.
Scott Penner (herein appellant) appeals from a judgment (order of dismissal) entered February 23, 1983, after demurrer to his third amended complaint was sustained without leave to amend.

(1) (See fn. 1.) FACTS[1]
In August 1980, appellant was a tenant in an apartment building. The apartment building was "owned, operated, managed, controlled, maintained, *861 equipped, inspected, illuminated, supervised, guarded, [and] provided security for" by respondents.
On August 5, 1980, while he was on the premises, appellant "was accosted and assaulted by two (2) non-tenant intruders who were waiting in the common hallway of said premises." As a result of the robbery, burglary, false imprisonment, batteries, assaults and physical harm, appellant sustained injuries. In the first cause of action appellant sought both compensatory and punitive damages on a negligence theory. In the second cause of action for breach of warranty of habitability, appellant sought only compensatory damages.
The third amended complaint contained the following allegations:
"7. At all times herein mentioned, the defendants, and each of them, owed a duty to plaintiff with respect to said apartment, to provide, among other things, adequate and secure entrances, gates, doors and locks; adequate lighting and illumination; notice, warning, supervision, guarding, security provisions, management, control, maintenance, operation, equipment, inspection and to maintain security, and otherwise provide plaintiff with a safe place to live.
"8. On or about August 5, 1980, plaintiff was residing in defendants' apartment building, as referred to above. Plaintiff is informed and believes and thereon alleges that at said time and place, as a result of defendants' affirmative actions and/or failures to act, said apartment building, the approaches, entrances, and common areas thereto including the gates, doors, windows, locks, interior hallway illumination, hallways, vegetation and surrounding walkways were unattended, inadequate and in disrepair, and unsecure, and among other things, that defendants, and each of them, negligently owned, managed, controlled, maintained, operated, equipped, inspected, illuminated, noticed, warned, supervised, guarded, and secured said premises, and that the defendants, and each of them, by their affirmative actions and/or failures to act negligently failed to provide adequate security and/or warnings with respect to said apartments.
"9. Plaintiff is informed and believes and thereon alleges that on or about August 5, 1980, the defendants, and each of them, and their officers, directors, managing agents, and/or partners, well knew or, in the exercise of reasonable care, should have known that as a result of their affirmative actions and/or failures to act that their said apartment building, the approaches, entrances, and common areas thereto including the gates, doors, windows, locks, interior hallway illumination, hallways, vegetation and walkways were so negligently owned, managed, controlled, maintained, operated, *862 equipped, inspected, illuminated, noticed, warned, supervised, guarded and otherwise so provided with security and/or notices and/or warnings or the lack thereof that the defendants, and each of them, knew and/or reasonably foresaw that they were not providing a safe apartment building; that there was the reasonably foreseeable risk that tenants of said apartments and their guests would become the victims of crimes on said premises, including criminal attacks; that it was reasonably forseeable to anticipate future crimes against the tenants of said premises and their guests while on the premises; and that plaintiff would be exposed to the danger of a criminal attack upon his person and property on August 5, 1980, when he was a resident of an apartment designated as Apartment No. 2; that said crimes were encouraged, invited, and/or caused by the affirmative actions and/or failures to act of defendants, and each of them, with respect to their negligent ownership, management, control, maintenance, operation, equipping, inspection, illumination, supervision, and guarding of said apartment building, the supervision, and guarding of said apartment building, [sic] the approaches and entrances thereto, including the gates, doors, windows, locks, interior hallway illumination, hallways, vegetation and walkways. Plaintiff is informed and believes that the defendants, and each of them, had knowledge and/or reason to foresee that such conduct was foreseeable and likely to occur in the future, based upon a variety of statistics, reports, maps, charts, records and other information including, but not limited to their awareness of the following facts, among other things, all of which plaintiff alleges to be true, and all of which facts alleged were known or should have been known to defendants, and each of them, on and within two years prior to August 5, 1980:
"(a) That Apartment No. 2 and the approaches, entrances, and common areas, including among other things, interior hallway illumination, hallways, doors, windows, vegetation, gates and locks thereto, were so constructed as to permit access by criminally inclined persons; and tenants of said premises, seeking to protect themselves from crime, had requested that defendants inspect, repair, place and/or replace the doors, gates, locks, entrances and interior hallway illumination to said apartment building, and provide adequate security measures, and defendants failed and/or refused to do so;
"(b) That the apartment building and the approaches, entrances, and common areas, including, among other things, the doors, windows, gates, interior hallway illumination, hallways, vegetation, gates and locks thereto, and security measures were lacking, inadequate and so constructed and maintained as to invite and permit access by criminally inclined persons, and tenants of said premises, seeking to protect themselves from crime, requested that defendants inspect, repair, place and/or replace said doors, *863 gates, locks, interior hallway illumination, security measures and the entrances to said premises and defendants refused and/or failed to do so;
"(c) That the apartment building, the approaches, entrances, and common areas thereto, including the hallways, interior hallway illumination, walkways and sidewalks, illumination, and the vegetation thereabouts, provided convenient hiding places for criminally inclined persons to gain access without other tenants' knowledge, and to secrete themselves and to lie in wait, and the interior lights selected and used by defendants provided inadequate illumination and were periodically out or inoperative and were not replaced for unreasonable periods of time;
"(d) That within two years before August 5, 1980, various crimes had been committed on the premises, in the neighborhood, in said apartments, and in the approaches, entrances, and common areas thereof, including the garages, laundry room, hallways, walkways, and gateways, including trespass, robbery, burglary, physical assault, battery, rape, murder, prostitution, vandalism and other crimes against persons and property. Notwithstanding defendants' awareness thereof, tenants had requested that defendants repair, place or replace a door or gate for the entrances to said premises and defendants refused and/or failed to do so; tenants had complained to defendants that unauthorized persons were often in the building and defendants failed or refused to exclude said persons or prevent their access, repeated acts of burglary and auto vandalism had occurred in the apartment units and the parking area of said apartment and tenants notified defendants of said events and requested that the security facilities be installed, repaired or replaced so as to prevent access by intruders and defendants failed and/or refused to take action, and tenants of said building had warned and complained to defendants that unless repairs or replacements to the security measures were made, someone would become the victim of criminal attack on the premises, and defendants failed and/or refused to make said repairs;
"(e) Because defendants were aware of (1) crimes in the apartment building and apartments thereof which were caused, invited, encouraged, and/or permitted by the conditions of the premises, (2) tenant reports of crime on the premises, (3) tenant complaints regarding the unsecure and inadequate conditions on the premises which permitted free access to the premises and said criminal activity, (4) express tenant requests for and the obvious need to repair, change, and/or take corrective measures with regard to the inadequate security conditions of the premises, including free access to the premises, and (5) the nature of the neighborhood itself, including the occurrence of criminal activity therein; defendants knew or, in the exercise of reasonable care, should have known that the conditions on the premises made it foreseeable that criminals and intruders would gain access to and *864 commit crimes on said premises, attack tenants, and/or future crime would occur on the premises exposing tenants to the forseeable unreasonable risks of harm which constituted a threat to the safety of any and all persons on or using said premises, thus constituting special circumstances giving rise to a duty of care on the part of Defendants, and each of them, to take appropriate security measures for the protection of their business invitees and tenants, including plaintiff. Defendants retained the right, power and authority to make the changes, repairs, and/or corrective measures necessary to preclude criminals and/or intruders from the premises and the apartments thereof; tenants did not have the right, power, and/or authority to do so. Notwithstanding this defendants failed to disclose, failed to repair, failed to remedy, change or initiate any corrective measures which they knew, and/or had reason to know if not done, the premises would continue to cause, encourage, permit, and invite, further criminal activity and/or crimes by intruders on said premises and expose tenants to the dangers of criminal attack. In so doing and/or failing to act, defendants further caused, permitted and invited the commission of crimes on the premises and permitted, encouraged, and invited intruders on the premises due to the condition of the premises. Further, said defects in the premises including the security thereof caused, permitted and invited intruders onto the premises on August 5, 1980."
Respondents' asserted grounds of demurrer to the third amended complaint were that no cause of action was stated in either count and that each count was uncertain. Respondents filed a motion to strike the allegations concerning punitive damages on the basis that there was inadequate factual material in the complaint to support a claim for punitive damages. Respondents also sought to strike from the prayer that portion relating to punitive damages. The court granted the motion to strike. The minute order ruling on the demurrer states: "Demurrer to 3rd amended complaint sustained on grounds taken."

ISSUES
The issues before us are: (A) Does the third amended complaint set out a cause of action against respondents for negligence? (B) If so, has there been adequately pled a basis for the award of punitive damages? (C) Does the third amended complaint set out a cause of action for breach of warranty of habitability?

DISCUSSION

A. Negligence

Three cases dealing with adequacy of pleadings sketch the current status in California of the duty of a landlord to residential tenants, for criminal acts of violence committed upon tenants on the premises.
*865 O'Hara v. Western Seven Trees Corp. (1977) 75 Cal. App.3d 798 [142 Cal. Rptr. 487], involved a plaintiff-tenant who alleged that defendant-landlord knew that a male Caucasian, whose drawing had been furnished to defendant, had raped several tenants of the apartment complex. In spite of this knowledge, when plaintiff was a prospective tenant, defendant assured her that the premises were safe and were patrolled by guards. Relying on the representations, plaintiff rented an apartment from defendant. Three months later, she was raped in her apartment. The assailant was the same person who had committed the other rapes and whose composite drawing had been furnished to defendant.
The court held that a cause of action had been stated for negligence in failing to provide adequate security. In holding that demurrer to the negligence cause of action should have been overruled, the court stated, "It has been held that since only the landlord is in the position to secure common areas, he has a duty to protect against types of crimes of which he has notice and which are likely to recur if the common areas are not secure. Liability does not make the landlord an insurer of the tenants' safety; the duty is merely to exercise reasonable care. [Citations.]" (O'Hara v. Western Seven Trees Corp., supra, 75 Cal. App.3d at pp. 802-803.)
Kwaitkowski v. Superior Trading Co. (1981) 123 Cal. App.3d 324 [176 Cal. Rptr. 494], concerned a plaintiff-tenant who alleged that she had been raped, assaulted and robbed in the lobby of her apartment building. She also alleged that the lock on the front door that led to the lobby area was defective. As a result, strangers easily gained access to the lobby. The defendant-landlord had notice of the dangers to tenants and knew that nonresidents were entering the building and pandering in the lobby. At least two months before plaintiff was assaulted, the defendants knew that the lock was defective and that strangers had easy access to the lobby. Nonetheless, defendants did nothing to repair the door and failed to maintain adequate lighting in the lobby area. The court on appeal ruled that a cause of action had been stated.
7735 Hollywood Blvd. Venture v. Superior Court (1981) 116 Cal. App.3d 901 [172 Cal. Rptr. 528], was a case in which a plaintiff-tenant alleged simply that the defendant-landlord had knowledge that violent crime had occurred in the general area and neighborhood within the previous six months and that the landlord had failed to replace a burned out light which lit the outside of plaintiff's apartment. Plaintiff was the victim of a forcible rape inside her apartment at 4:30 a.m. The court held that no cause of action had been stated, in part because there were "no factual allegations to support the claim that the owner of the apartment house possessed knowledge *866 any more precise than the knowledge of any citizen in Los Angeles County that there are violent crimes committed in this county." (At pp. 903-904.)
Gomez v. Ticor (1983) 145 Cal. App.3d 622 [193 Cal. Rptr. 600], did not involve a tenant as victim of the crime and was not a pleading case. Gomez is, nonetheless, instructive. There, summary judgment had been granted by the trial court and the Court of Appeal reversed. In Gomez, wrongful death actions had been brought against the proprietor of a parking structure adjacent to a commercial building, by heirs of a decedent who was shot in that parking structure. The theory underlying the complaints was that the operator of the structure had failed to take reasonable precautions to prevent violent attacks on patrons of the structure. The evidence presented in opposition to the motion for summary judgment disclosed that 16 acts of theft or vandalism occurred on defendant's premises in the three years prior to the shooting of decedent. On this basis, the Gomez court held that the question of forseeability was a question of fact to be determined by the jury; summary judgment was, consequently, improper.
Riley v. Marcus (1981) 125 Cal. App.3d 103 [177 Cal. Rptr. 827], also reached the Court of Appeal after summary judgment was granted in favor of a landlord. In Riley, the tenant of an apartment contended that her landlord negligently failed to maintain the premises in a safe condition by failing to provide adequate lighting and adequate door locks. As a result of these failings, it was alleged that an intruder entered her apartment and raped her. The court affirmed and noted that, "there was no history of any rapes or similar acts of violence which had occurred on the premises and which, unless adequate steps were taken, would likely reoccur." (Id., at p. 109.)
(2) In analyzing the pleading before us for review, we note that paragraphs 9(d) and 9(e) allege an awareness by respondents of conditions which, under O'Hara v. Western Seven Trees Corp., supra, 75 Cal. App.3d 798, and Kwaitkowski v. Superior Trading Co., supra, 123 Cal. App.3d 324, give rise to a duty on their part.
Among other things, respondents were aware of crimes in the apartment building and apartments therein caused by the condition of the premises. Respondents were aware of tenant reports of crime on the premises. Respondents were aware of tenant complaints concerning conditions which permitted free access to the premises and permitted criminal activity thereon. Within two years before appellant was assaulted, respondents were aware that acts of trespass, robbery, burglary, physical assault, battery and rape had been committed on the premises and in the apartments. In this same time frame, respondents knew of tenant complaints that unauthorized *867 persons were often in the building but respondent refused to exclude them or prevent their access.
We conclude that it was error to sustain the demurrers to the first cause of action.

B. Punitive Damages

(3) "In order to justify an award of exemplary damages, the defendant must be guilty of oppression, fraud or malice. (Civ. Code, § 3294.) He must act with the intent to vex, injure or annoy, or with a conscious disregard of the plaintiff's rights." (Silberg v. California Life Ins. Co. (1974) 11 Cal.3d 452, 462 [113 Cal. Rptr. 711, 521 P.2d 1103].)
In defining malice for purposes of awarding punitive damages, Civil Code section 3294, subdivision (c)(1) provides: "`Malice' means conduct which is intended by the defendant to cause injury to the plaintiff or conduct which is carried on by the defendant with a conscious disregard of the rights or safety of others."
(4) To support an award of punitive damages on the basis of conscious disregard of the safety of others, a plaintiff "must establish that the defendant was aware of the probable dangerous consequences of his conduct, and that he willfully and deliberately failed to avoid those consequences." (Taylor v. Superior Court (1979) 24 Cal.3d 890, 895-896 [157 Cal. Rptr. 693, 598 P.2d 854].)
(5) Appellant here has met the test of Silberg, Taylor and Civil Code section 3294. The pleadings sufficiently allege facts setting forth long existing physical conditions of the premises which portend danger for the tenants. The pleadings also set out that respondents knew of those conditions for up to two years, had power to make changes, but failed to take corrective and curative measures. If proven, these allegations would support an award of punitive damages. We conclude that the motion to strike the punitive damage allegations was therefore improperly granted.

C. Breach of Warranty of Habitability

(6) Appellant relies on two California cases to support his contention that a cause of action for breach of warranty of habitability has been set forth. Those are Kwaitkowski v. Superior Trading Co., supra, 123 Cal. App.3d 324, and Secretary of Housing & Urban Dev. v. Layfield (1978) 88 Cal. App.3d Supp. 28 [152 Cal. Rptr. 342]. The reference to warranty of habitability in Kwaitkowski came in the final paragraph of the opinion and *868 was stated as follows: "We conclude, therefore, that the landlords' duty to Ms. Kwaitkowski was based on: 1) the special relationship; 2) the foreseeability of the criminal attack; and 3) the warranty of habitability implicit in the lease contract." (Kwaitkowski v. Superior Trading Co., supra, 123 Cal. App.3d at p. 333.)
There is in Kwaitkowski no discussion of the parameters of the warranty of habitability and no discussion of the breach of such a warranty as the basis for a separate cause of action.[2]Kwaitkowski is not authority for the existence of a cause of action for breach of implied warranty of habitability owing to failings in security of the leased premises.
In Secretary of Housing & Urban Dev. v. Layfield, supra, 88 Cal. App.3d Supp. 28, the court dealt with a tenant who had a written month-to-month lease. The tenant attempted to raise as a defense to an unlawful detainer proceeding the purported failure of the landlord to provide security guards. The trial court declined to receive into evidence a handbook issued by the landlord which contained assurances on security of the premises. The appellate department held that it was error to exclude that evidence.
The availability to tenants in an unlawful detainer action of the defense of breach of implied warranty of habitability was established in Green v. Superior Court (1974) 10 Cal.3d 616 [111 Cal. Rptr. 704, 517 P.2d 1168]. In discussing that warranty the court declared, "We have concluded that a warranty of habitability is implied by law in residential leases in this state and that the breach of such a warranty may be raised as a defense in an unlawful detainer action. Under the implied warranty which we recognize, a residential landlord covenants that premises he leases for living quarters will be maintained in a habitable state for the duration of the lease. This implied warranty of habitability does not require that a landlord ensure that leased premises are in perfect, aesthetically pleasing condition, but it does mean that `bare living requirements' must be maintained. In most cases substantial compliance with those applicable building and housing code standards which materially affect health and safety will suffice to meet the landlord's obligations under the common law implied warranty of habitability we now recognize...." (At p. 637.)
Appellant has not alleged in his second cause of action facts to show that the living quarters were not in a habitable state, that bare living requirements *869 have not been maintained by respondents or that respondents have failed to comply with applicable building and housing code standards.
There is here neither the allegation of a written lease nor the allegation of an agreement with respondents concerning security of the premises. Further, this case is distinguishable from Kline v. 1500 Massachusetts Avenue Apartment Corp. (D.C. Cir.1970) 439 F.2d 477 [43 A.L.R. 3d 311], cited by appellant in support of the proposition that alleged lapses by a landlord in security measures should support a cause of action for breach of implied warranty of habitability.
In Kline, the tenant was assaulted and robbed at 10 p.m. in the common hallway of a 585-unit apartment building. The building had a main entrance on one street, with side entrances on two cross streets, 15th Street and 16th Street.
When the tenant first signed a lease seven years before the incident, "a doorman was on duty at the main entrance twenty-four hours a day, and at least one employee at all times manned a desk in the lobby from which all persons using the elevators could be observed. The 15th Street door adjoined the entrance to a parking garage used by both the tenants and the public. Two garage attendants were stationed at this dual entranceway; the duties of each being arranged so that one of them always was in position to observe those entering either the apartment building or the garage. The 16th Street entrance was unattended during the day but was locked after 9:00 P.M. [¶] By mid-1966, however, the main entrance had no doorman, the desk in the lobby was left unattended much of the time, the 15th Street entrance was generally unguarded due to a decrease in garage personnel, and the 16th Street entrance was often left unlocked all night. The entrances were allowed to be thus unguarded in the face of an increasing number of assaults, larcenies, and robberies being perpetrated against the tenants in and from the common hallways of the apartment building. These facts were undisputed, and were supported by a detailed chronological listing of offenses admitted into evidence. The landlord had notice of these crimes and had in fact been urged by appellant Kline herself prior to the events leading to the instant appeal to take steps to secure the building." (Kline v. 1500 Massachusetts Avenue Apartment Corp., supra, 439 F.2d at p. 479, fn. omitted.)
The tenant testified that she had initially moved into the building because she was interested in security. She had been impressed by the precautions taken at the main entrance.
On these facts the court found "implied in the contract between landlord and tenant an obligation on the landlord to provide those protective measures *870 which are within his reasonable capacity." (Kline v. 1500 Massachusetts Avenue Apartment Corp., supra, 439 F.2d at p. 485.)
Appellant here has not alleged that there existed a level of security of the premises which was relied upon by him in entering into the landlord-tenant relationship. Appellant has not alleged that respondents permitted or effected a reduction in that level of security which existed at the time he entered into the lease.
The general demurrer to the second cause of action was properly sustained.

DISPOSITION
The judgment is reversed. The matter is remanded with instructions to the trial court to enter a new order sustaining without leave to amend the general demurrer to the second cause of action, overruling the demurrers to the first cause of action and denying the motion to strike.
McClosky, Acting P.J., and Troost, J.,[*] concurred.
A petition for a rehearing was denied April 18, 1984.
NOTES
[1]  For purposes of this appeal, we accept as true all facts properly alleged in the third amended complaint, since they are deemed admitted by the demurrer. (Thompson v. County of Alameda (1980) 27 Cal.3d 741, 746 [167 Cal. Rptr. 70, 614 P.2d 728, 12 A.L.R.4th 701].)
[2]  In Riley v. Marcus, supra, 125 Cal. App.3d 103, a separate cause of action had been pled on a breach of implied warranty of habitability theory. Demurrer to that cause of action was sustained and petition for writ of mandate was denied by the Court of Appeal. The appeal before the court concerned only the ruling on a motion for summary judgment in connection with the cause of action for negligence.
[*]   Assigned by the Chairperson of the Judicial Council.
