
523 N.W.2d 242 (1994)
246 Neb. 739
S.I., Appellant,
v.
H. Michael CUTLER and Betty F. Cutler, Appellees.
No. S-93-152.
Supreme Court of Nebraska.
October 28, 1994.
*243 David R. Stickman, Omaha, for appellant.
Joseph E. Jones, of Fraser, Stryker, Vaughn, Meusey, Olson, Boyer & Bloch, P.C., Omaha, for appellees.
HASTINGS, C.J., WHITE, CAPORALE, FAHRNBRUCH, and LANPHIER, JJ., and BOSLAUGH, J., Retired.
PER CURIAM.
S.I. brought an action against H. Michael Cutler and Betty F. Cutler, alleging that because of their negligence, the Cutlers were liable for an assault upon S.I. by a third party which occurred on premises owned by the Cutlers. The district court sustained the Cutlers' demurrer to S.I.'s third amended petition and dismissed the case. S.I. appeals, assigning as error the district court's ruling on the demurrer.

SCOPE OF REVIEW
When reviewing an order sustaining a demurrer, an appellate court accepts the truth of the facts which are well pled, together with the proper and reasonable inferences of law and fact which may be drawn therefrom, but does not accept as true the conclusions of the pleader. Erichsen v. No-Frills Supermarkets, 246 Neb. 238, 518 N.W.2d 116 (1994); Durand v. Western Surety Co., 245 Neb. 649, 514 N.W.2d 840 (1994).

FACTS
In our review of the district court's ruling on the demurrer, we accept as true the following allegations in S.I.'s third amended petition: At all times relevant, the Cutlers were the owners of a building located at 3000 Farnam Street in Omaha. On July 5, 1990, S.I. was an employee of the Visiting Nurses of the Midlands, which was a tenant of the building owned by the Cutlers. As such, S.I. was a business invitee. S.I. was assaulted in the elevator of the building as she reported for work at approximately 8:30 a.m. on July 5. The assailant also attempted to take S.I., via the elevator, to the vacant ninth floor of the building.
We also accept as true S.I.'s allegations that a burglary had occurred in the building on January 10, 1990; that the assailant and other unknown persons had assaulted or otherwise threatened the Cutlers' business invitees on other occasions; that the Cutlers knew or should have known that the assailant had been standing in the entrance of the building since 8 a.m. on July 5 and had previously been ejected from the building by a security guard for loitering; and that the assailant had assaulted patrons of the Cutlers' building several times prior to the attack on her.
S.I.'s third amended petition alleged that the Cutlers' security guard knew that the assailant had been observed loitering around the building for 3 to 4 months and, specifically, had been observed 3 or 4 days prior to the attack on her. S.I. further alleged that the Cutlers and their security guard had received complaints about the assailant's presence and the assaults he committed on the premises.

ANALYSIS
When reviewing an order sustaining a demurrer, an appellate court accepts the truth of the facts which are well pled, together with the proper and reasonable inferences of law and fact which may be drawn therefrom, but does not accept as true the conclusions of the pleader. Erichsen v. No-Frills Supermarkets, supra; Durand v. Western Surety Co., supra. In ruling on a demurrer, the petition is to be construed liberally. If as so construed the petition states a cause of action, the demurrer is to be overruled. Hoiengs v. County of Adams, 245 Neb. 877, 516 N.W.2d 223 (1994).
S.I.'s claim is based on the theory that the Cutlers were negligent and were liable for the acts of a third party which occurred on property owned by them. In order to succeed in an action based on negligence, *244 a plaintiff must establish the defendant's duty not to injure the plaintiff, a breach of that duty, proximate causation, and damages. Zeller v. County of Howard, 227 Neb. 667, 419 N.W.2d 654 (1988). The question of whether a legal duty exists for actionable negligence is a question of law dependent on the facts in a particular situation. Schmidt v. Omaha Pub. Power Dist., 245 Neb. 776, 515 N.W.2d 756 (1994); Parrish v. Omaha Pub. Power Dist., 242 Neb. 783, 496 N.W.2d 902 (1993).
From the facts alleged in the petition, we must consider whether the Cutlers had a legal duty to protect S.I. from the criminal acts of a third party. "`A duty, in negligence cases, may be defined as an obligation, to which the law will give recognition and effect, to conform to a particular standard of conduct toward another.'" Schmidt, 245 Neb. at 786, 515 N.W.2d at 763, quoting W. Page Keeton et al., Prosser and Keeton on the Law of Torts § 53 (5th ed. 1984).
In order to state a cause of action, S.I. must allege facts which, if true, would establish a duty on the part of the Cutlers to protect her from the criminal acts of a third person. Factors to consider in imposing a duty on a landlord include weighing the relationship of the parties against the nature of the risk and the public interest in the proposed solution, the likelihood of injury, the magnitude of the burden of guarding against the injury, and the consequences of placing that burden on a defendant. See C.S. v. Sophir, 220 Neb. 51, 368 N.W.2d 444 (1985).
Whether the Cutlers owed a duty to S.I. depends upon whether her injury was reasonably foreseeable. As Justice Cardozo stated in Palsgraf v. Long Island R.R. Co., 248 N.Y. 339, 344, 162 N.E. 99, 100 (1928), "The risk reasonably to be perceived defines the duty to be obeyed...." The possessor of land is not required to anticipate the unforeseeable acts of third persons. It is only when such acts can reasonably be anticipated that the possessor has a duty to take some precautionary measures to protect against such independent acts. Harvey v. Van Aelstyn, 211 Neb. 607, 319 N.W.2d 725 (1982). Prior acts or events may establish whether the acts of third parties are foreseeable. Thus, if the landowner, by the exercise of reasonable care, could have foreseen the occurrences of such acts, then the landowner must exercise reasonable care to keep the premises safe for business invitees.
In Harvey, 211 Neb. at 611-12, 319 N.W.2d at 727-28, quoting Hughes v. Coniglio, 147 Neb. 829, 25 N.W.2d 405 (1946), we reiterated the rule of Restatement (Second) of Torts § 344 (1965):
"[T]he proprietor of a place of business who holds it out to the public for entry for his business purposes, is subject to liability to members of the public while upon the premises for such a purpose for bodily harm caused to them by the accidental, negligent, or intentionally harmful acts of third persons, if the proprietor by the exercise of reasonable care could have discovered that such acts were being done or were about to be done, and could have protected the members of the public by controlling the conduct of the third persons or by giving a warning adequate to enable them to avoid harm...."
We also recognized that the possessor of land who holds it open to the public for entry for his business purposes is not an insurer of the safety of such visitors against the acts of third persons, but that
"[h]e is, however, under a duty to exercise reasonable care to give them protection. In many cases a warning is sufficient care if the possessor reasonably believes that it will be enough to enable the visitor to avoid the harm, or protect himself against it. There are, however, many situations in which the possessor cannot reasonably assume that a warning will be sufficient. He is then required to exercise reasonable care to use such means of protection as are available, or to provide such means in advance because of the likelihood that third persons ... may conduct themselves in a manner which will endanger the safety of the visitor."
Harvey, 211 Neb. at 614-15, 319 N.W.2d at 729. We affirmed the district court's granting of a directed verdict for the bar owner in Harvey, holding that the bar owner was not bound to anticipate the unforeseen entry of *245 the third party on the premises and the totally unexpected subsequent assault upon the plaintiff.
One prior incident may not be sufficient to impose a duty upon the landowner. In C.S. v. Sophir, supra, we affirmed the trial court's denial of recovery against the landlord in an action brought by a tenant who was sexually assaulted. Although there had been one prior assault on the premises, we held that it would be unfair to impose liability upon a landlord based on a single prior assault at the apartment complex. We noted that other courts had imposed liability only where there was a history of criminal activity at the premises which created notice of the foreseeability that such activity would occur in the future.
However, in K.S.R. v. Novak & Sons, Inc., 225 Neb. 498, 406 N.W.2d 636 (1987), we held that the landlord had a duty to protect the tenant against the foreseeable criminal acts of a third person because a history of criminal activity existed. In that case, the landlord failed to repair the lock on the front door of the tenant's apartment after being asked to do so, and the tenant was sexually assaulted in her apartment. In reversing the summary judgment in favor of the landlord, we held that there were genuine issues of material fact as to foreseeability, negligence, and proximate cause.
The apartment complex was not equipped with locks on the outside doors, and the common areas were accessible to anyone. Two days before the assault, the tenant observed the assailant masturbating in a laundry room directly across from her apartment, and she reported the incident to the police. Two days later, she was confronted by the assailant in her apartment, at which time she was sexually assaulted at knifepoint.
Approximately 1 week prior to the assault, the tenant's door had been kicked in, and the dead bolt on the door separating the apartment from the common hallway was broken. The tenant had reported the incident to the apartment manager and made daily requests that the lock be repaired. No action was taken until the morning after the assault. The assailant had a history of frequenting the building, and the apartment manager acknowledged that the assailant had been caught several times masturbating in the building. The manager told police that the assailant had previously broken into a tenant's apartment and stood naked at the foot of the bed in a nearby building owned and managed by the defendant. We distinguished K.S.R. from Sophir based on the repeated intrusions and objectionable sexual conduct of the assailant which were known to the landlord and the history of criminal activity by the assailant at the leased premises.
In the case at bar, the factual situation falls somewhere between that of K.S.R. and that of Sophir. The Cutlers had contacted a security company to protect their business invitees against the criminal acts of third parties. There was a history of criminal activity at the Cutlers' premises in that the assailant had previously been ejected from the building by the Cutlers' security guard for loitering and assaulting patrons of the building. The assailant had been observed loitering in and around the building for 3 to 4 months and, specifically, had been observed 3 or 4 days prior to the attack. On the day of the incident, the assailant had been standing in the entrance of the Cutlers' building for half an hour prior to the assault.
When we consider the relationship between S.I. and the Cutlers, the nature of the attendant risk, the opportunity and ability of the Cutlers to exercise reasonable care, and the public's interest in a solution to the security problem, we find that the Cutlers had a duty to exercise reasonable care to protect S.I. under the circumstances alleged in her third amended petition. This duty is imposed because the third amended petition alleged a sufficient amount of criminal activity by this particular assailant to make further criminal acts by the assailant reasonably foreseeable. It was alleged that the assailant was known to have assaulted other persons on the Cutlers' premises, and this activity imposed a duty on the Cutlers to take reasonable precautions to protect persons entering the premises from this assailant.
The facts as alleged in the third amended petition, when taken as true for purposes of *246 the demurrer, show that this incident was not the result of a random criminal act by a third party and that the actions of the assailant were reasonably foreseeable. The district court erred in sustaining the demurrer and dismissing the third amended petition; therefore, the judgment of the district court is reversed and the cause is remanded for further proceedings.
REVERSED AND REMANDED FOR FURTHER PROCEEDINGS.
WRIGHT, J., participating on briefs.
FAHRNBRUCH, Justice, concurring.
I concur with both the reasoning and the result in this case and wish to distinguish my position in this case from my position in Erichsen v. No-Frills Supermarkets, 246 Neb. 238, 518 N.W.2d 116 (1994), in which I dissented.
Although the court majority reaches the same result in each case, the cases are factually dissimilar. In Erichsen, the plaintiff, a business invitee, was attacked in a parking lot which served several businesses, including the one which the plaintiff had patronized before her assault. The attack was apparently a random one by an individual who was completely unknown to the business owner. The plaintiff's most serious injuries occurred when she attempted to retrieve her purse from the attacker's automobile, became entangled in the seatbelt, and was dragged for a distance of some 1.6 miles.
I dissented in Erichsen because a random criminal attack is as foreseeable to a victim as to a business owner, the manner in which the plaintiff was injured was bizarre and utterly unforeseeable to a business owner, and there exists no practical way for a business owner to either warn or protect victims of such attacks in a parking lot. Furthermore, even though the majority in Erichsen was willing to impose a duty upon a business owner to either warn or protect customers, the court was unwilling or unable to say how a business owner might meet this duty and thus comply with the law.
I find the facts in the present case to be much more compelling for the imposition of a duty on the building owners to provide a safe environment for business invitees. Perhaps most significantly, S.I. was attacked by an individual who not only had been involved in attacks on other patrons of the building, but who had also been observed in the entrance to the building for at least 30 minutes prior to the assault on S.I. The Cutlers or their agent, the security guard, were aware of this, while S.I. apparently was not. It should have been entirely foreseeable to the Cutlers that an individual with a known history of violence on the premises would engage in further acts of violence. Thus, I would impose on the Cutlers a duty to protect a business invitee which I was unwilling to impose on No-Frills.
