OPINION OF THE COURT
SCIRICA, Chief Judge.Khar Abdulah and his wife brought suit in the Philadelphia Court of Common Pleas against Appellants Woodlake Management, Cliveden Realty Corp., Cliveden 2002, L.P. d/b/a Cliveden Apartments, and Cliveden, L.P. (collectively “Woodlake”) for personal injuries sustained in a shooting at the Cliveden Apartments. Appellee Alea London Ltd. (“Alea”), Woodlake’s insurer, sought a declaratory judgment in federal court to establish that an assault and battery exclusion in the insurance policy discharged its duty to defend or indemnify Woodlake. The United States District Court for the Eastern District of Pennsylvania granted Alea’s motion for judgment on the pleadings. We will affirm.
I.
On July 13, 2005, Abdulah was shot multiple times by an unknown assailant at the Cliveden Apartments, a property owned or maintained at all times by Woodlake. Ab-dulah and his wife filed suit asserting multiple counts of negligence against Wood-lake. In particular, Abdulah claimed Woodlake failed to provide or repair a working security lock, creating a dangerous and defective condition on the premises and enabling the assailant to enter the apartment building.1 Alea brought a declaratory judgment action in federal court arguing an exclusion in the policy for claims arising out of or related to an assault or battery, including a failure to prevent or suppress an assault or battery, exempted it from its duty to defend Wood-lake in Abdulah’s suit. The exclusion provides:
This insurance does not apply to any claim arising out of an assault and/or battery regardless of culpability or intent or out of a physical altercation or out of any act or failure to act to prevent or suppress such assault and/or battery or a physical altercation whether caused by the insured, an employee, a patron, or any other person.... The company is under no duty to defend or to indemnify an insured in any action or proceeding alleging such damages arising out of an assault and/or battery or physical altercation. This exclusion applies as well to any claims by any other person, firm or organization, asserting rights derived from, or contingent upon, any person *429asserting a claim arising out of an assault and/or battery or a physical altercation, and specifically excludes from coverage claims for: emotional distress, or for loss of ... consortium____
This exclusion applies to all causes of action arising out of an assault and/or battery regardless of culpability or intent or out of a physical altercation including, but not limited to, allegations of negligent hiring, placement, training, or supervision, or to any act, error, or omission relating to such an assault and/or battery or a physical altercation.
Woodlake argued the exclusion did not apply because Abdulah alleged Woodlake’s negligence caused his injuries. The District Court granted Alea’s motion for judgment on the pleadings under Fed.R.Civ.P. 12(c), concluding that because Abdulah’s injuries arose from the assault and not directly from Woodlake’s alleged negligence, the exclusion applied. Woodlake now appeals.2
II.
Our review of a Rule 12(c) motion is plenary. Rosenau v. Unifund Corp., 539 F.3d 218, 221 (3d Cir.2008). Judgment on the pleadings “will not be granted unless the movant clearly establishes that no material issue of fact remains to be resolved and that he is entitled to judgment as a matter of law.” Id. (quoting Jablonski v. Pan Am. World Airways, Inc., 863 F.2d 289, 290 (3d Cir.1988)). We must view all facts and draw all inferences in the light most favorable to the non-moving party. Id.
When interpreting an insurance contract under Pennsylvania law, which all parties agree governs the dispute, the court must ascertain and give effect to the parties’ intent as manifested in the terms of the policy. Donegal Mut. Ins. Co. v. Baumhammers, 595 Pa. 147, 938 A.2d 286, 290 (2007). Where the contract language is ambiguous, we must construe that provision in favor of the insured. Minn. Fire & Cas. Co. v. Greenfield, 579 Pa. 333, 855 A.2d 854, 861 (2004). But, where the language is clear and unambiguous, we must give effect to it. Id. If an insurer relies on a policy exclusion as an affirmative defense to deny coverage, it bears the burden of proving the exclusion applies.3 Madison Constr. Co. v. Harleysville Mut. Ins. Co., 557 Pa. 595, 735 A.2d 100, 106 (1999). The duty of an insurer to defend the insured applies to any suit in which the complaint alleges injuries that may potentially fall within the grant of coverage. Baumhammers, 938 A.2d at 290-91. The court must look beyond the cause of action pled to the factual allegations included in the complaint. Id. at 291.
The exclusion denies coverage for claims “arising out of’ an assault or battery. The term “arising out of’ is interpreted in terms of “but for” causation. See Madison Constr., 735 A.2d at 109-10. Therefore, if an assault or battery was a “but for” cause of the plaintiffs injuries, an assault and battery exclusion will apply to allegations that the insured’s negligence contributed to the injuries. See Acceptance Ins. Co. v. Seybert, 757 A.2d 380, 383 (Pa.Super.Ct.2000). The insurer only owes a duty to defend if the complaint alleges the insured’s negligence itself directly led to the injuries. See QBE Ins. Corp. v. M & S Landis Corp., 915 A.2d 1222, 1229 (Pa.Super.Ct.2007).
*430The parties’ dispute on appeal centers on the application of two Pennsylvania Superior Court cases: Seybert and QBE. In Seybert, the plaintiff brought suit against Belmont Bar, alleging it negligently served alcohol to five visibly intoxicated men who subsequently attacked him. 757 A.2d at 381. Belmont argued an assault and battery exclusion did not apply because the claims were based on Belmont’s negligence. Id. at 383. The court disagreed, holding that because the plaintiffs injuries resulted solely from the assault and battery, Belmont’s negligence was merely a contributing factor and not a direct cause of the injuries. Id.
In QBE, the underlying complaint alleged employees of defendant Fat Daddy’s Nightclub forcibly ejected a patron and improperly restrained him, eventually smothering him to death. 915 A.2d at 1224. The complaint alleged Fat Daddy’s negligently restrained the patron and negligently trained and hired its staff, causing the patron’s death. Id. The court held the exclusion did not apply because the complaint alleged the injuries “arose from the alleged negligence,” not from an assault or battery. Id. at 1229. Accordingly, the alleged negligence was a direct cause of the injuries, triggering the duty to defend. Id.
All injuries alleged in this complaint are the result of the shooting itself,4 and accordingly, the assault was a “but for” cause of Abdulah’s injuries. There was no allegation in the complaint that Woodlake’s negligence directly caused his injuries or caused any independent harm, as there was in QBE. Rather, Woodlake’s failure to provide a working security lock contributed to the shooting in much the same way as Belmont’s negligent selling of alcohol to visibly intoxicated individuals contributed to the plaintiffs injuries in Seybert. Moreover, Woodlake’s alleged negligence only relates to its failure to prevent or suppress the assault. The assault and battery exclusion encompasses claims arising both from an assault or battery and from a failure to prevent or suppress an assault or battery. This language unambiguously bars coverage for Abdulah’s claims, and accordingly, Alea has no duty to defend or indemnify Woodlake.5
III.
For the foregoing reasons, we will affirm the District Court’s grant of Judgment on the Pleadings.
. Abdulah's additional allegations of negligence all related to the inadequate security lock. For example, he alleged Woodlake negligently failed to warn him of the condition and negligently failed to train its employees to repair the lock.
. The District Court had jurisdiction under 28 U.S.C. § 1332(a)(2). We have jurisdiction over the appeal under 28 U.S.C. § 1291.
. Alea does not argue Abdulah’s injuries do not fall under the policy’s grant of coverage, see Baumhammers, 938 A.2d at 293 (holding an intentional act by a third party still constituted an "occurrence” under an insurance contract), but rather claims only that the assault and battery exclusion bars coverage.
. The shooting constituted an assault under Pennsylvania law. See 18 Pa. Const. Stat. § 2701 (defining assault as "negligently causing] bodily injury to another with a deadly weapon”).
. Abdulah's wife also brought a claim against Woodlake for loss of consortium. This claim derives from the assault, and coverage for it is explicitly barred by the language of the exclusion.