Originally, A&S (D) separately contracted with P, and Hartford (D) or primary liability insurance. The EPA sued A&S (D) to recover costs for responding to a contamination clean up. A&S (D) called upon its three insurers for defense and indemnity. P filed this action against A&S (D), Federal (D), and Hartford (D). P sought a declaration of the parties' rights and duties as they relate to A&S's (D) claims for insurance coverage for environmental liabilities. Each insurer denies liability to A&S (D). Each claims that if it is liable one or both of the other insurers would be liable to it for reimbursement under various theories. Complete diversity existed and the district court had jurisdiction pursuant to 28 U.S.C. § 1332. A&S (D) filed a virtually identical declaratory judgment action against USF&G (P), Federal (D), Hartford (D), and others in a New Jersey state court. A&S (D) then moved to realign the parties in this federal action. The district court used the 'principal purpose' standard and aligned the three insurers as plaintiffs and A&S (D) as the sole defendant. The realignment destroyed complete diversity, and the district court dismissed the action for lack of jurisdiction. P appealed.