Maria Rodriguez, Administratrix of the estate of Maria Rodriguez; Maria Rodriguez and Jose Jorge, her husband; and Lillian and Jorge and Jose Jorge (Appellants) appeal from the February 7, 1994 orders of the Honorable Murray C. Goldman of the Court of Common Pleas of Philadelphia County (trial court), granting the motions for summary judgment of the City of Philadelphia (the City) and the Young Women’s Christian Association of Philadelphia (YWCA).
The issues before us are (1) whether the City is immune from suit; and (2) whether the YWCA breached a duty owed to Appellants.1 We conclude that the City is immune from Appellants’ suit; therefore, we affirm the trial court’s grant of summary judgment in favor of the City. We also conclude that the YWCA owed no duty to Appellants; therefore, we affirm the trial court’s grant of summary judgment in favor of the YWCA.
Background
Appellants, the surviving immediate family members of Maria Rodriguez (Decedent), brought wrongful death and survival actions against the City and the YWCA. The City and the YWCA moved for summary judgment. The trial court assumed as true Appellants’ alleged facts for the purpose of deciding these motions.
Appellants contended that Decedent was killed by Louis Billa, a detainee from a work release detention center operated by the City in a facility leased from the YWCA. Billa had been sentenced to partial confinement at the center by two separate orders of the trial court. On January 8, 1987, while serving time at the center,
Billa left the detention center at an unauthorized time and without permission, despite the fact that his floor had a monitor on duty to prevent such behavior. Billa crossed the street and entered the home of the [Appellants]. Sixteen year old [Decedent] was home baby sitting her infant niece. There he brutally stabbed [Decedent], and while she was still alive, crushed her skull with a baseball bat. The deceased’s body was discovered later that afternoon by her sister and brother.
(Trial court opinion at 6.)
Under the lease agreement for the detention center between the YWCA and the City, the center was to be used as a residence for convicted criminals in the custody of the Department of Corrections. The City agreed in the lease to provide security guards and to prevent detainees from engaging in unsafe or immoral conduct. The City agreed to indemnify the YWCA for all liability for damage to any third party’s property or person occurring on the City’s leased *107space. The YWCA retained the joint right to use the gymnasium and pool and the right to inspect the leased premises.
Appellants contended that the City had promised the community that only non-violent prisoners would reside at the facility and that the detainees would be confined to the facility unless travelling to and from jobs or treatment programs. Contrary to the City’s promises to the community, Appellants contended that the facility housed prisoners, including the detainee who murdered Decedent, with known dangerous propensities. Additionally, Appellants contended that detainees, among other infractions, roamed the neighborhood without permission, received drugs and alcohol at the facility, and engaged in behavior otherwise constituting a public nuisance. Appellants asserted that the YWCA knew or should have known of these infractions.
Appellants asserted negligence claims against the City, contending that the City had contractually waived its governmental immunity through its agreement in the lease to indemnify the YWCA for any harm caused by the City’s negligence. Appellants asserted a breach of contract claim against the YWCA, under a third party beneficiary theory, for its alleged failure to enforce the City’s promise to prevent unsafe detainee conduct. Appellants also asserted tort claims against the YWCA, as a landowner and/or lessor, for allegedly allowing the establishment and maintenance of a dangerous condition on its land.
In a well reasoned opinion, the trial court granted summary judgment for the City and the YWCA. With respect to Appellants’ claims against the City, the court held that, assuming arguendo that Appellants had stated a valid claim against the City at common law, Appellants’ cause of action did not fall within any exception to sovereign immunity enumerated in the Judicial Code.2 Further, the court held that the City had not waived its immunity by contract.
With respect to the breach of contract claim against the YWCA, the court determined that Appellants, neighbors of the facility, were not intended beneficiaries of the lease. Rather, the court determined that any safeguards in the lease were intended for the YWCA’s benefit as landlord. With respect to the negligence claims, the court held that, even assuming arguendo that the YWCA breached some duty owed to Appellants, the YWCA’s alleged negligence was not the proximate cause of Appellants’ injury. Rather, the court held, the murder of Decedent by the detainee was a superseding cause. The court reasoned that, the only infractions of which the YWCA may have been aware involved detainee rowdiness such as pulling cases of beer through the windows or urinating on public sidewalks; therefore, it was not foreseeable to the YWCA that any violence toward a neighborhood resident, let alone murder, would occur.
On appeal to this Court, with respect to the City, Appellants argue that Ludwin v. Port Authority Transit Corp., 102 Pa.Commonwealth Ct. 36, 517 A.2d 1006 (1986), supports their contention that the City contractually waived its immunity through its agreement to indemnify the YWCA under the lease. Appellants concede the inapplicability of any exception to immunity under the Judicial Code, but argue that neither the Code nor case law prohibits a municipality from waiving its immunity by contract. With respect to the YWCA, Appellants argue that a violent crime committed against a neighborhood resident was a foreseeable result of the YWCA’s breach of contract and/or negligence.
Discussion
Contractual Waiver of Immunity of the City
We address first Appellants’ argument that the trial court erred in concluding *108that the City is immune from suit despite an alleged waiver of immunity by contract.3 Appellants refer to the following indemnity provision of the lease:
Tenant will be responsible for and hereby relieves Landlord from and indemnifies Landlord against all liability by reason of any injury, damage or loss to any person or property which occurs in or about the Tenant’s Space, unless resulting from the negligence of Landlord.... Tenant further releases Landlord from all liability for damage to or loss of any property of Tenant or any third party which may result from the leakage of water into the Tenant’s Space, or from any other cause, unless resulting from the negligence of Landlord.
(R.R. at 41a-42a.) In arguing that this indemnity provision operates as a contractual waiver of immunity, Appellants rely on this Court’s statement in Ludwin that the terms of a similar indemnity provision in a lease “are tantamount to a waiver of immunity by the City.” Ludwin, 102 Pa.Commonwealth Ct. at 45, 517 A.2d at 1010. A complete reading of Ludwin, however, demonstrates that any waiver of immunity contemplated under that lease pertained to the City’s liability to the indemnee. Therefore, Ludwin, at best, would support only a cross-claim by the YWCA against the City under the indemnity provision of the lease.4
In any case, Ludwin remains of questionable validity. The rationale of Ludwin relies upon the City’s ability to waive immunity by ordinance. However, the Supreme Court later declared invalid the City’s waiver of immunity by ordinance in City of Philadelphia v. Gray, 534 Pa. 467, 633 A.2d 1090 (1993). Additionally, we observed in Sims v. Silver Springs-Martin Luther School, 155 Pa.Commonwealth Ct. 619, 625 A.2d 1297 (1993), that the legislature never intended, under the Judicial Code, that a local agency be held liable for tort damages under a contract theory. Accord: Johnson v. City of Philadelphia, — Pa.Commonwealth Ct. -, 657 A.2d 87 (1995).
Therefore, because Appellants’ cause of action against the City does not fall within any exception to sovereign immunity, we conclude that the trial court properly granted summary judgment in favor of the City.
Liability of the YWCA
Appellants contend that the murder of Decedent was a foreseeable result of the YWCA’s breach of contract and/or negligence. We first review Appellant’s contention that the community was an intended beneficiary of the lease provision which required the City to prevent detainees from engaging in unsafe conduct. In Guy v. Liederbach, 501 Pa. 47, 459 A.2d 744 (1983), our Supreme Court expressly adopted Section 302 of the Restatement (Second) of Contracts as a guide for determining third party beneficiary claims. Section 302 provides:
(1) Unless otherwise agreed between promisor and promisee, a beneficiary of a promise is an intended beneficiary if recognition of a right to performance in the beneficiary is appropriate to effectuate the intention of the parties and either
(a) the performance of the promise will satisfy an obligation of the promisee to pay money to the beneficiary; or
(b) the circumstances indicate that the promisee intends to give the beneficiary the benefit of the promised performance.
(2) An incidental beneficiary is a beneficiary who is not an intended beneficiary.
Restatement (Second) of Contracts § 302. Accordingly, the Supreme Court has held that unless the contracting parties expressed an intention in the contract to benefit the third party, a third party beneficiary claim may be asserted only if “the circumstances *109are so compelling that recognition of the beneficiary’s right is appropriate to effectuate the intention of the parties, and ... the circumstances indicate that the promisee intends to give the beneficiary the benefit of the promised performance.” Scarpitti v. Weborg, 530 Pa. 366, 372-73, 609 A.2d 147, 150-51 (1992). The Court explained that “[t]he first part of the test sets forth a standing requirement which leaves discretion with the court to determine whether recognition of third party beneficiary status would be appropriate” and the second part defines the type of claimant who may be intended as a third party beneficiary. Id, at 371, 609 A.2d at 150.
Deeter v. Dull Corp., 420 Pa.Superior Ct. 576, 617 A.2d 336 (1992) petition for allowance of appeal denied, 535 Pa. 619, 629 A.2d 1380 (1993), illustrates application of these principles. In that case, employees of a mining company sought to impose liability on the lessor of the mine. Under the lease agreement between the employer and the lessor, in a section entitled, “INDEMNIFICATION AND INSURANCE,” the employer agreed to maintain workers’ compensation insurance for the employees. The Superior Court held that the intent of the insurance provision was to protect the lessor from potential lawsuits and to create an obligation on the part of the employer/lessee to indemnify the lessor, notwithstanding the employer’s statutory immunity under the Workers’ Compensation Act.
Likewise, in the case at bar, although the City allegedly promised the community to take certain security measures, there is no indication that the contracting parties intended to benefit the community under the lease agreement. The specific lease provision upon which Appellants rely provides as follows:
Tenant shall not, ... conduct itself or permit its employees, guests, residents, clients, detainees or visitors to conduct themselves in a manner which is improper, unsafe, immoral, illegal or not in keeping with the use set forth [in a preceding paragraph].
(R.R. at 39a-40a.) Additionally, as previously noted, the City agreed to indemnify the YWCA for any injury to third parties occurring on the leased premises. We conclude that the intent of the lease was to protect the YWCA from potential liability and to create an obligation on the part of the City to indemnify the YWCA, notwithstanding governmental immunity. We discern no intent on the part of the contracting parties to impose a duty on the YWCA to enforce the City’s promise for the benefit of the community. Therefore, we conclude that the trial court properly held that Appellants’ are not intended beneficiaries of the lease.
We next address Appellants’ contention that the YWCA owed a duty to protect the community as landowner and/or lessor of the facility. Appellants rely on Section 364 of the Restatement (Second) of Torts,5 relating to liability of the possessors of land to persons outside of the land and Sections 379A and 837 of the Restatement (Second) of Torts,6 relating to liability of a lessor of land *110to persons outside of the land after transfer of possession.
With respect to landowner liability, Appellants refer to Mascaro v. Youth Study Center, 514 Pa. 351, 523 A.2d 1118 (1987), a ease similar to the one before us, in which an escaped detainee from the City’s Youth Study Center committed violent crimes against third parties outside of the Center. Our Supreme Court held, in Mascaro, that, absent immunity, the plaintiffs had stated a valid cause of action against the City and its Youth Study Center for negligent maintenance of real estate, premised generally upon the Restatement (Second) of Torts. We believe that, under the circumstances of our case, Mascaro arguably would support a cause of action against the City, absent governmental immunity, as possessor of the work release center. However, we do not believe that such liability extends to the YWCA.
Under Mascaro and, specifically, Section 364 of the Restatement, liability is premised upon possession and control of the land, not merely ownership.7 See, e.g., Smith v. King’s Grant Condominium, 537 Pa. 51, 640 A.2d 1276 (1994); see also Deeter. As alleged by Appellants, the YWCA leased the work release program facility to the City. The YWCA retained only the right to inspect the leased premises and the joint right to use the recreational facilities on the leased premises. There is no allegation that the YWCA retained possession of the work release program facility or control of the operation of the facility. The fact that the YWCA reserved certain limited rights in the leased premises cannot be used to impose liability on the YWCA when the City had exclusive control of the work release program itself, which allegedly facilitated the injury in this case. See Remmel v. Gallagher, 190 Pa.Superior Ct. 100, 152 A.2d 796 (1959).
We also believe that Sections 379A and 837 of the Restatement (Second) of Torts cannot be used to impose liability on the YWCA as a lessor of the facility. Those sections expressly require knowledge, on the part of the lessor, of an unreasonable risk of harm or nuisance at the time of the lease. Here, Appellants have alleged no facts indicating that, at the time of the lease agreement, the YWCA had reason to know that the murder of Decedent was an unavoidable consequence of the work release program or that the YWCA had reason to expect that the City would conduct the work release program in a manner that would cause harm to others. To the contrary, as alleged by Appellants, at the time of the lease agreement, the City promised to provide security and to prevent unsafe or immoral detainee conduct. The alleged danger in this case, i.e. the assignment of violent criminals to the facility, the poor supervision, and the unauthorized departures of the detainees, arose after execution of the lease agreement.
Because we conclude that the YWCA owed no duty to the community under the lease agreement or as landowner or lessor, we cannot conclude that the YWCA’s actions or inactions were a legal cause of Appellants’ injury.8
*111We conclude, therefore, that the trial court properly granted summary judgment in favor of both the City and the YWCA.
Affirmed.
ORDER
AND NOW, this 30th day of March, 1995, the orders of the Court of Common Pleas of Philadelphia County dated February 7, 1994, July Term, 1987 No. 338 granting summary judgment in favor of the City of Philadelphia and the Young Women’s Christian Association of Philadelphia are hereby affirmed.
. Our scope of review of an appeal from the grant of summary judgment is limited to determining whether the trial court committed an error of law or an abuse of discretion. Rankin v. Southeastern Pennsylvania Transportation Authority, 146 Pa.Commonwealth Ct. 429, 606 A.2d 536 (1992). Summary judgment is appropriate only where the pleadings, depositions, answers to interrogatories, admissions, and affidavits, if any, demonstrate that there is no genuine issue as to any material fact and the moving party is entitled to judgment as a matter of law. Pa.R.C.P. No. 1035; Sims v. Silver Springs-Martin Luther School, 155 Pa.Commonwealth Ct. 619, 625 A.2d 1297 (1993).
. Section 8541 of the Judicial Code provides as follows:
Except as otherwise provided in this subchap-ter, no local agency shall be liable for any damages on account of any injury to a person or property caused by any act of the local agency or an employee thereof or any other person.
42 Pa.C.S. § 8541. Section 8542 enumerates exceptions to the general grant of governmental immunity.
. We reiterate that Appellants do not challenge the trial court’s determination that the real estate exception to sovereign immunity, 42 Pa.C.S. § 8542(b)(3), can not be used to impose liability where, as here, the condition of the real estate merely facilitated damages actually caused by the acts of others, Mascaro v. Youth Study Center, 514 Pa. 351, 523 A.2d 1118 (1987).
. We need not determine, here, whether any differences in the phraseology of the Ludwin lease and the YWCA's lease would otherwise preclude the City’s liability for the alleged negligent conduct in this case.
. Section 364 provides in pertinent part:
364 Creation or Maintenance of Dangerous Artificial Conditions.
A possessor of land is subject to liability to others outside of the land for physical harm caused by a structure or artificial condition on the land, which the possessor realizes or should realize will involve an unreasonable risk of harm, if
(b) the condition is created by a third person with the possessor’s consent or acquiescence while the land is in his possession, or
(c) the condition is created by a third person without the possessor's consent or acquiescence, but reasonable care is not taken to make the condition safe after the possessor knows or should know of it.
Restatement (Second) of Torts § 364.
. Section 379A provides:
379A. Activities After Lessor Transfers Possession.
A lessor of land is subject to liability for physical harm to persons outside of the land caused by activities of the lessee or others on the land after the lessor transfers possession if, but only if,
(a) the lessor at the time of the lease consented to such activity or knew that it would be carried on, and
(b) the lessor knew or had reason to know that it would unavoidably involve such an unreasonable risk, or that special precautions neces-saty to safety would not be taken.
Restatement (Second) of Torts § 379A. Section 837 provides:
837. Activities After Transfer of Land.
*110(1) A lessor of land is subject to liability for a nuisance caused by an activity carried on upon the land while the lease continues and the lessor continues as owner, if the lessor would be liable if he had carried on the activity himself, and
(a) at the time of the lease the lessor consents to the activity or knows or has reason to know that it will be carried on, and
(b) he then knows or should know that it will necessarily involve or is already causing the nuisance.
Restatement (Second) of Torts § 837.
. A "possessor of land” is defined under the Restatement as follows:
(a) a person who is in occupation of the land with intent to control it or
(b) a person who has been in occupation of land with intent to control it, if no other person has subsequently occupied it with intent to control it, or
(c) a person who is entitled to immediate occupation of the land, if no other person is in possession under Clauses (a) and (b).
Restatement (Second) of Torts § 328E.
. We note, however, our disagreement with the trial court's analysis of foreseeability. Assuming arguendo, as did the trial court, that the YWCA owed a duty to Appellants, the issue is whether the alleged facts show that the third party’s conduct was so extraordinary as not to be reasonably foreseeable. Powell v. Drumheller, -Pa. -, 653 A.2d 619 (1995). Appellants alleged that the YWCA was aware that violent criminals *111were housed at the facility, were poorly supervised, and left at unauthorized times. Where the alleged or stipulated facts, as here, are equivocal or such that reasonable minds could differ as to whether the intervening conduct constituted a superseding cause, the question would be one for submission to the jury. Id.