
    BOROUGH OF MOOSIC; Moosic Borough Council; Moosic Borough Planning Commission; Moosic Borough Zoning Board of Adjustments; Joseph Mercatili, individually and in his official capacity as President of Moosic Borough Council; Joseph Dente, individually and in his official capacity as Vice President of Moosic Borough Council and member of the Moosic Borough Planning Commission; Thomas Harrison, Individually and in his official capacity as Moosic Borough Manager; Bryan Fauver, individually and in his official capacity as Chairman of Moosic Borough Planning Commission; James Durkin, Individually and in his official capacity as Moosic Borough Zoning and Enforcement Officer, Appellants v. DARWIN NATIONAL ASSURANCE COMPANY* *(Amended pursuant to Clerk Order of 4/22/13).
    No. 12-3141.
    United States Court of Appeals, Third Circuit.
    Argued on July 18, 2013.
    Opinion Filed Feb. 4, 2014.
    David J. Strasser, Esquire (Argued), William B. Pentecost, Jr., Esquire, Eckert, Seamans, Cherin & Mellott, Pittsburgh, PA, John J. Brazil, Esq., Solicitor Borough of Moosic, Scranton, PA, for Appellants.
    Anthony L. Miscioscia, Esquire (Argued), Gale White, Esquire, White & Williams, Philadelphia, PA, for Appellee.
    
      Before: RENDELL, SMITH and ROTH, Circuit Judges.
   OPINION

ROTH, Circuit Judge:

This appeal involves a dispute over insurance coverage. The appellants — the Borough of Moosic, the Moosic Borough Council, the Moosic Borough Planning Commission, the Moosic Borough Zoning Board of Adjustments, and five individuals associated with these organizations (collectively, the Insureds) — sought a declaration in the District Court that their insurer, Darwin National Assurance Company, had a duty to defend and indemnify them against a lawsuit brought by two residents of the Borough of Moosic. The District Court granted Darwin’s motion to dismiss for failing to state a claim on June 29, 2012, and the Insureds appealed. For the reasons that follow, we will remand this case to the District Court.

I. Background

On December 23, 2010, Edward and Jeanne Zaloga brought a lawsuit against the Insureds under 42 U.S.C. § 1983 alleging violations of the Zalogas’ civil rights (Underlying Action). The Underlying Action provided as factual background that the Zalogas lived next door to and, since 2005, had been in an ongoing dispute with Jack Williams Tire & Auto Service Center over land use issues. The Zalogas had further alleged that their attempts to resolve the dispute had caused the Insureds to violate the Zalogas’ First Amendment and Due Process rights.

The Insureds notified Darwin about the Underlying Action. The Insureds had a “claims made” Public Officials Professional Liability Policy from Darwin that provided coverage for all of the defendants named in the Underlying Action. The insuring agreement provided that Darwin would pay for loss that was the result of any claim made during the policy period against the Insureds for a public official’s wrongful act. Darwin denied coverage for the defense or indemnity of the Underlying Action in a letter dated June 2, 2011. Darwin explained that the Underlying Action and several other actions brought by the Zalogas were related claims under the policy. As a result of the policy’s related claims provision, “this matter constitutes a single Claim against Insureds for a Public Officials Wrongful Act first made on August 5, 2005[,]” when the first of the related claims was made. Darwin concluded that the Underlying Action was thus first made before the policy period began on August 1, 2010, and therefore not covered by the Insureds’s policy.

Most pertinent to this appeal, the Zalo-gas had previously brought a mandamus complaint against the Borough of Moosic and affiliated individuals on February 10, 2006, in the Superior Court of Lackawanna County, Pennsylvania (Mandamus Complaint). The Mandamus Complaint alleged that the Borough of Moosic and its zoning officer had failed to investigate zoning violations committed by Jack Williams Tire & Auto Service Center or to bring appropriate enforcement actions. The Zalogas sought injunctive relief. The Mandamus Complaint was dismissed on June 5, 2006, though the court ordered that “upon proper application, the [Zalogas] shall be granted a hearing before the Moosic Zoning Hearing Board.”

After Darwin denied coverage, the Insureds brought suit in the U.S. District Court for the Middle District of Pennsylvania, seeking a declaration that Darwin owed them a duty to defend and to indemnify with respect to the Underlying Action. Darwin filed a motion to dismiss under Federal Rule of Civil Procedure 12(b)(6), arguing that the Insureds had not demonstrated that the Underlying Action was covered by their policy for the reasons stated in the denial letter. The Insureds opposed the motion. Darwin filed a reply brief on January 12, 2012, and attached to its brief ten documents which consisted of (1) the insurance policy, (2) the denial letter, (8) six letters from the Zalogas to the Borough of Moosic and various government officials, (4) the Mandamus Complaint, and (5) the Borough of Moosic’s motion to dismiss the Underlying Action. The District Court dismissed the Insureds’s complaint on June 29, 2012, and they appealed.

II. Discussion

The Insureds first argue that the District Court erred by considering documents outside of the pleadings in deciding Darwin’s motion to dismiss. While the Insureds do not specify which documents the District Court improperly considered, they argue that Darwin “sandbagged” them by attaching documents to Darwin’s reply brief.

Generally, a district court ruling on a motion to dismiss may not consider matters extraneous to the pleadings. In re Burlington Coat Factory Sec. Litig., 114 F.3d 1410, 1426 (3d Cir.1997); see Pension Benefit Guar. Corp. v. White Consol. Indus. Inc., 998 F.2d 1192, 1196 (3d Cir.1993) (noting that courts usually consider only the allegations in the complaint, attached exhibits, and matters of public record). If matters outside the pleadings are presented to and not excluded by the court, the motion to dismiss must be converted to a motion for summary judgment under Rule 56 and the court must give all parties a reasonable opportunity to present pertinent evidence. Fed.R.Civ.P. 12(d). “However, an exception to the general rule is that a ‘document integral to or explicitly relied upon in the complaint’ may be considered ‘without converting the motion [to dismiss] into one for summary judgment.’ ” In re Burlington Coat Factory Sec. Litig., 114 F.3d at 1426 (quoting Shaw v. Digital Equip. Corp., 82 F.3d 1194, 1220 (1st Cir.1996)). “A court may consider an undisput-edly authentic document that a defendant attaches as an exhibit to a motion to dismiss if the plaintiffs claims are based on the document.” Pension Benefit Guar. Corp., 998 F.2d at 1196.

Here, the attached documents meet that definition of “integral to or explicitly relied upon in the complaint.” They were therefore properly considered by the District Court.

The Insureds next argue that the District Court erred in granting Darwin’s motion to dismiss. We exercise plenary review over a district court’s grant of a Rule 12(b)(6) motion for failure to state a claim. Grier v. Klem, 591 F.3d 672, 676 (3d Cir.2010).

To withstand a Rule 12(b)(6) motion to dismiss, “a complaint must contain sufficient factual matter, accepted as true, to state a claim to relief that is plausible on its face.” Ashcroft v. Iqbal, 556 U.S. 662, 678,129 S.Ct. 1937, 173 L.Ed.2d 868 (2009) (internal quotation marks and citation omitted). “We do not inquire whether a plaintiff will ultimately prevail when considering a motion to dismiss, only whether the plaintiff is entitled to offer evidence to support his or her claims.” Grier, 591 F.3d at 676.

We begin with the text of the insurance policy that Darwin issued to the Insureds. Under Pennsylvania law, the interpretation of insurance contracts is a matter of law for the courts to decide. Allstate Prop. & Cas. Ins. Co. v. Squires, 667 F.3d 388, 391 (3d Cir.2012) (citing Paylor v. Hartford Ins. Co., 536 Pa. 583, 640 A.2d 1234,1235 (1994)). “When the language of an insurance contract is clear and unambiguous, a court is required to enforce that language.” Med. Protective Co. v. Watkins, 198 F.3d 100, 103 (3d Cir.1999).

The insuring agreement in the Insureds’ policy states that:

The Insurer will pay on behalf of any Insured, subject to the Limit of Liability set forth in ITEM (3)(a) of the Declarations, Loss which the Insured is legally obligated to pay as a result of any Claim first made against any Insured during the Policy Period or any applicable Extended Reporting Period for a Public Officials Wrongful Act which occurred on or after the Retroactive Date and before the end of the Policy Period.

The policy defines a claim as, inter alia, “any written demand for monetary damages or non-monetary relief,” and a claim is “deemed to have been first made when an Insured receives notice of the claim.” The Policy Period is August 1, 2010, to August 1, 2011, arid the policy defines a Public Official’s Wrongful Act as, inter alia, “any actual or alleged violation of civil rights protected under 42 U.S.C.1981 et seq. or similar federal, state or local law” by an insured and committed in the performance of his or her duties for the Named Insured. Finally, the policy has no retroactive date, so the wrongful act could have occurred at any time in the past before the end of the policy period.

Looking only to the language of the insuring agreement, its defined terms, and the Underlying Action, we must conclude that the Underlying Action is a claim that would be covered. The Underlying Action is a claim under the policy because it sought monetary damages, and this claim was first made during the policy period because the Insureds received notice of it on December 23, 2010, when the Underlying Action was filed. The Underlying Action alleged civil rights violations, which constitute a public official’s wrongful acts, and the alleged wrongful action occurred on or after the policy’s retroactive date because the policy has no retroactive date.

Our analysis, however, does not end here. In the “Conditions” section of the policy, it states that “All Related Claims will be treated as a single Claim made when the earliest of such Related Claims was first made,.... ” Under the policy,

“Related Claims” means all Claims for Wrongful Acts based upon, arising out of, resulting from, or in any way involving the same or related facts, circumstances, situations, transactions or events or the same or related series of facts, circumstances situations, transactions or events, whether related logically, causally or in any other way.

The District Court concluded that the Underlying Action was not covered under the policy because the Underlying Action and the Mandamus Complaint were Related Claims. As such, they were treated as being made on February 10, 2006, when the Mandamus Complaint was filed. Because this was before the inception of the policy, the Insureds had failed to allege that the Underlying Claim was covered by the policy and, consequently, failed to state a claim upon which relief could be granted.

By analyzing the Related Claims provision in this way, the District Court treated it as a condition precedent. If the Related Claims provision is a condition precedent to coverage, the Insureds initially bear the burden of demonstrating that a claim falls within the policy’s grant of coverage and must demonstrate that the Underlying Action and the Mandamus Complaint are not Related Claims. State Farm Fire & Cas. Co. v. Estate of Mehlman, 589 F.3d 105, 111 (3d Cir.2009). On the other hand, if the Related Claims provision is an exclusion, then the insurer bears the burden of proving that any loss falls within the scope of an exemption in the insurance contract. Peters Twp. Sch. Dist. v. Hartford Accident & Indem. Co., 833 F.2d 32, 37 (3d Cir.1987). The Insureds argue that the District Court erred by treating the Related Claims provision as a condition precedent and that it is instead an exclusion. We agree.

“A condition precedent is either an act of a party that must be performed or a certain event that must happen before a contractual right accrues or contractual duty arises.” 13 Williston on Contracts § 38:7 (4th ed.); see 44 Am.Jur.2d Insurance § 1033 (2013) (“Conditions neither confer nor exclude coverage for a particular risk but, rather, impose certain duties on the insured in order to obtain the coverage provided by the policy.”). An exclusion in an insurance policy is a “limitation of liability or carving out of certain types of loss to which the coverage or protection of the policy does not apply.” 17 Williston on Contracts § 49:111 (4th ed.).

The Related Claims provision here acts to limit coverage under the policy. If a claim is related to previous claims, all of the claims will be treated as one claim that was made at the same time as the oldest claim. As a result, a claim like the one at issue here that meets the requirements listed in the insuring agreement may still be denied coverage because the Related Claims provision operates to change the date the claim was first made from a date within the policy period to a date before the policy period began. The Related Claims provision thus carves out certain types of loss — those related to claims made before the inception of the policy— from the protection provided by the policy.

Furthermore, the Related Claims provision does not fit within the definition of condition precedent. There is no act the insured must perform or certain event that must occur for there to be no related claim that was first made before the policy period began. In fact, quite the opposite is true. If a certain event occurs, namely that the claim is related to a claim that was made before the policy period, the duty to provide insurance coverage is extinguished.

While the Related Claims provision appears in the section titled “Conditions,” rather than the section titled “Exclusions,” the location of the provision in the policy is not determinative. “All provisions of an insurance contract must be read together and construed according to the plain meaning of the words involved, so as to avoid ambiguity while at the same time giving effect to all of its provisions.” Post v. St. Paul Travelers Ins. Co., 691 F.3d 500, 517 (3d Cir.2012) (quoting Masters v. Celina Mut. Ins. Co., 209 Pa.Super. 111, 224 A.2d 774, 776 (Ct.1966).) Other courts have found that the location of a provision within an insurance policy does not determine whether it is a condition or an exclusion. See, e.g., Stonewall Ins. Co. v. Asbestos Claims Mgmt. Corp., 73 F.3d 1178, 1205 (2d Cir.1995) (“[U]nder New York law, the exclusionary effect of policy language, not its placement, controls allocation of the burden of proof.”).

Because the Related Claims provision limits coverage, we find that it is an exclusion to the insurance policy. See Peters v. World Mut. Health & Accident Ins. Co. of Pa., 206 Pa.Super. 406, 213 A.2d 116, 117-18 (1965) (finding that provision was an exclusion to the policy based on its language). As a result, Darwin bears the burden of proving that the loss caused by the Zalogas’ complaint falls within the Related Claims provision. “Where an insurer relies on a policy exclusion as the basis for its denial of coverage and refusal to defend, the insurer has asserted an affirmative defense and, accordingly bears the burden of proving such defense.” Canal Ins. Co. v. Underwriters at Lloyd’s London, 435 F.3d 431, 435 (3d Cir.2006).

At this stage of this case, however, the District Court was not in a position to determine whether Darwin could prevail on the affirmative defense that the policy exclusion for Related Claims applied. “Generally speaking, [this Court] will not rely on an affirmative defense ... to trigger dismissal of a complaint under Rule 12(b)(6).” Victaulic Co. v. Tieman, 499 F.3d 227, 234-35 (3d Cir.2007). The Insureds argue that the Mandamus Complaint was a misplaced zoning appeal and so does not constitute a Related claim. Darwin does not agree. We will remand this case to the District Court for further proceedings to determine the applicability of the Related Claims exclusion, the applicability of the Protection of Innocent Insureds provision and what further action is then required.

IV. Conclusion

For the foregoing reasons, we will remand this case to the District Court for further proceedings consistent with this opinion. 
      
      . Darwin contends that the policy period began on August 1, 2010, but the Borough of Moosic Insureds argue that the policy inception date is actually August 1, 2006. This difference does not matter for purposes of this appeal.
     
      
      . The District Court had jurisdiction pursuant to 28 U.S.C. § 1332 because the Insureds are citizens of Pennsylvania while Darwin is a citizen of Connecticut, and the amount in controversy exceeds $75,000. We have jurisdiction pursuant to 28 U.S.C. § 1291.
     
      
      . The Insureds also assert that the District Court applied the exclusion listed in Part III, Paragraph C(9) of the policy to find that they had failed to state a claim. This is incorrect. The District Court based its analysis on Paragraph F(4) in Part IV, which is described above.
     
      
      . In remanding, we are in no way determining the merits of either the underlying complaint, the Protection of Innocent Insureds provision or the Related Claims affirmative defense.
     