delivered the opinion of the court;
The Chicago Housing Authority (defendant) filed a motion to strike and dismiss the second amended complaint filed by Alberta Smith (plaintiff), as administrator of the estate of Robert Lee Hatcher, in her action under the Illinois Wrongful Death Act. The cause was dismissed with prejudice and plaintiff appeals.
Plaintiff’s second amended complaint contained the following pertinent allegations. On August 7, 1972, defendant owned and operated a public housing project in Chicago. Defendant rented out apartments in *968the project for residential purposes. Plaintiff’s decedent, Robert Lee Hateher, lived with his family as a tenant in one of these apartments. The housing project was the locale of numerous acts of violence, including shooting incidents and gang warfare. Defendant knew, or in the exercise of due care would have known, of such incidents.
On August 7, 1972, as decedent was entering the building, in which he lived, he was shot and killed by a person upon the premises. At that same time, plaintiff’s decedent and his heirs at law were in the exercise of ordinary care. Defendant was under a duty to control, operate and maintain its premises in such a manner as not to injure its tenants. Defendant foresaw or should have foreseen the occurrence which killed decedent.
The pleading further alleged that defendant carelessly and negligently operated and maintained its premises, failed to provide adequate or any security for its premises, failed to provide its tenants with safe entryways in and about the premises, and furnished the premises, if at all, with inadequate security measures. The cost to defendant of providing adequate safety measures was slight, considering the likelihood of injury to its tenants. The defendant was in the best position to deal with and absorb the costs of the burden of safeguarding the premises. As a direct and proximate result, plaintiff’s decedent was shot and died.
Defendant’s motion to dismiss alleged that plaintiff’s second amended complaint failed to state a cause of action; the complaint alleged no legal duty on the part of a landlord which would provide a basis for liability for tire death of decedent; the complaint failed to state any relationship to the Chicago Housing Authority of the person who shot decedent; and there is no duty in Illinois to hire and provide guards or watchmen to protect persons on the premises on a regular and continuing basis.
In due course, the trial court granted defendant’s motion and dismissed plaintiff’s cause with prejudice, citing Trice v. Chicago Housing Authority, 14 Ill. App. 3d 97, 302 N.E.2d 207, leave to appeal denied, 54 Ill. 2d 599.
The single issue raised and argued by both parties in this court is whether the second amended complaint states a cause of action or is “substantially insufficient in law * * Ill. Rev. Stat. 1973, ch. 110, par. 45(1).
The Practice Act provision that pleadings be “liberally construed with a view to doing substantial justice * * *” (Ill. Rev. Stat. 1973, ch. 110, par. 33(3)) will not avail to sustain a complaint which wholly fails to state a cause of action. (Yelkovanoglu v. Gordon, 19 Ill. App. 3d 261, 262, 311 N.E.2d 322.) In determining whether an assailed complaint is substantially insufficient in law, the well-pleaded facts are admitted by *969a motion to dismiss. City of Chicago v. Loitz, 61 Ill. 2d 92, 93, 329 N.E.2d 208.
To state a cause of action for negligence, the complaint must allege the breach of a duty owed by defendant to plaintiff. (Boyd v. Racine Currency Exchange, Inc., 56 Ill. 2d 95, 97, 306 N.E.2d 39.) The existence of a duty is a question of law to be determined by the court. (Barnes v. Washington, 56 Ill. 2d 22, 26, 305 N.E.2d 535; Fancil v. Q.S.E. Foods, Inc., 60 Ill.2d 552, 555, 328 N.E.2d 538.) If no duty was alleged, plaintiff’s complaint was properly dismissed.
Plaintiff’s fundamental contention is that defendant, as a landlord, has a duty to protect its tenants against criminal acts of third parties which occur on the premises.. Plaintiff discusses the issue of causation at some length. However, before that issue can be considered, it is necessary to answer the dispositive question of tire existence of a legal duty owed to plaintiff by defendant.
Plaintiff relies on Neering v. Illinois Central R.R. Co., 383 Ill. 366, 50 N.E.2d 497 to support her argument that defendant was under a legal duty to protect its tenants against the criminal acts of third parties. In Fleering, the court held that a railroad had a duty to protect persons waiting for a train upon its premises from the criminal acts of third parties. In Mrzlak v. Ettinger, 25 Ill. App. 3d 706, 323 N.E.2d 796, a hotel residence for girls was found to have a duty to protect its residents from criminal acts of third parties on the premises. Both of these situations are distinguishable from the case at bar. These relationships between innkeeper and guest, and common carrier and passenger are special legal relations which give rise to a duty to protect another against unreasonable risk of physical harm. See Fancil v. Q. S. E. Foods, Inc., 60 Ill. 2d 552, 559, 560, 328 N.E.2d 538, citing section 314(A) of Restatement (Second) of Torts (1965).
In Mims v. New York Life Insurance Co., 133 Ill. App. 2d 283, 273 N.E.2d 186, plaintiffs were tenants about to vacate their apartment at the termination of their lease. As was customary under such circumstances, defendant directed its head maintenance man to inspect plaintiffs’ apartment. Though tenants were usually notified of such inspections, notice was not given in tiffs instance. While the inspection was in progress, one of the tenants returned home and noted that the door was unlocked, though she had locked it before her departure. Upon entering the apartment, she found the defendant’s employee making his inspection. After he left, the plaintiff found that a fur coat and some money were missing from a closet. Tiffs court affirmed the judgment in favor of plaintiffs, stating that “The law imposes a duty to exercise ordinary care to guard against injury which may naturally flow as a reason*970ably probable and foreseeable consequence of one’s act * * *. ***** [Tjhe act of defendant’s employee in leaving the door to tire apartment unlocked, open and unguarded while he made an inspection of the premises during plaintiffs’ absence constituted a failure on the part of defendant to conform its conduct to the standard of duty imposed by law.” 133 Ill. App. 2d 283, 285.
In Stribling v. Chicago Housing Authority, 34 Ill. App. 3d 551, 340 N.E.2d 47, plaintiffs were tenants whose apartment was burglarized on three separate occasions. Each time the thieves broke through a wall which plaintiffs’ apartment shared with a vacant, adjacent apartment. Plaintiffs’ theory was that defendant had breached a legal duty by failing to adequately secure the vacant apartments. Noting the bizarre circumstances involved, this court held that the plaintiffs’ complaint alleged that the defendant owed plaintiffs a duty to guard against the second and third burglaries because, “after defendants had notice of the original burglary and the means used in effecting the burglary, the fact that another burglary could happen in the same fashion became eminently foreseeable.” 34 Ill. App. 3d 551, 556.
Both Mims and Stribling, cited by plaintiff, are distinguishable from the instant case. In Mims, defendant’s employee acted affirmatively in a manner which made it possible for the thief to enter the premises. In Stribling, the defendant, with notice, failed to act in a manner which would reasonably have prevented further thefts in the same, unusual fashion. In addition, in both of these cases tire loss inflicted upon plaintiffs was a direct result of the condition of the leased property itself. In one case we have the existence of two adjacent vacant apartments and in the other the unlocked condition of a door to the apartment. On tire contrary, in the case before us, the loss was inflicted by persons unknown and had no causal or other connection with or relation to the property itself.
The same observation applies to Johnston v. Harris (1972), 387 Mich. 569, 198 N.W.2d 409, also cited by plaintiff. There, when plaintiff was returning home, he reached for tire knob of the front door. The door was suddenly jerked open and plaintiff was assaulted and robbed by an unknown person “lurking in the poorly lighted, unlocked vestibule.” (387 Mich. 569, 572, 198 N.W.2d 409.) The court reversed a directed verdict at the end of plaintiff’s case. There the loss to plaintiff was connected with and resulted from condition of the premises which were poorly lighted and unlocked.
Trice v. Chicago Housing Authority, 14 Ill. App. 3d 97, 302 N.E.2d 207, involved a wrongful death resulting from an object thrown over a railing down to a common area of a housing project in Chicago. As in *971the case before us, the acts of the third party in throwing the object were characterized as criminal or criminally reckless. (14 Ill. App. 3d 97, 100.) This court affirmed dismissal of the complaint for failure to state a cause of action. The court stated the principle of law that “[i]n determining whether a duty exists, the likelihood of injury, the magnitude of the burden of guarding against it, and the consequences of placing that burden on defendant must be taken into account. Imposition of a duty does not depend upon foreseeability alone.” (14 Ill. App. 3d 97, 100.) In the instant case, as in Trice, the plaintiff alleged that the landlord had notice of the risk faced by the tenant. To require owners of real estate to protect tenants from possible criminal acts of third parties in common areas of the premises “would not permit use of ordinary, usual and customary construction and arrangement of the premises.” Trice, 14 Ill. App. 3d 97, 100,101.
In our opinion the trial court properly applied Trice to the case at bar. The loss here had no physical or causal connection to the premises themselves. The condition of the premises did not in any manner contribute to the loss inflicted upon plaintiff. Requiring an owner to repair and maintain the property imposes a reasonable and essential social duty. There is no requirement reasonable or otherwise which any court could impose upon property owners which could conceivably prevent occurrences such as described in plaintiff’s complaint. This type of crime springs from complex social and other causes far beyond rectification by any court. To impose liability in the case before us would unjustly place upon defendant as a property owner a legal duty which is impossible of performance.
Judgment affirmed.
BURKE and O’CONNOR, JJ., concur.