OPINION OF THE COURT
Supreme Auto Parts, Inc. (Supreme) appeals an order of the district court dismissing its counterclaims against Nationwide Mutual Fire Insurance Co. (Nationwide). This court has jurisdiction under 28 U.S.C. § 1291 (1976).
I.
T & D Cottage Auto Parts & Service, Inc. (T & D) was insured for loss by fire under a policy issued by Nationwide. When NationWide refused to pay T & D’s claims resultihg from a fire on T & D’s premises, T & D brought an action in the district court. T & D and Nationwide settled this suit for $35,-000.
In a subsequent action, based on 28 U.S.C. § 1335 and Rule 22 of the Federal Rules of Civil Procedure, Nationwide sought to interplead the settlement fund. It named as defendants Supreme, an assignee of T & D, and others who it asserted had claims against the settlement proceeds.
Subsequently, Nationwide moved for summary judgment. The district court denied the motion because it could not determine whether the defendants were asserting claims against the settlement that exceeded $35,000. The court ordered the defendants to file new pleadings specifying whether they were asserting claims against the settlement agreement or the policy. In the same opinion, the district court held that it had diversity jurisdiction to hear the Rule 22 interpleader claim. It did not determine whether it had jurisdiction over the statutory interpleader claim.
Pursuant to the district court’s order, Supreme filed an answer that included counterclaims for the amount that it had been assigned and for consumer fraud. After an evidentiary hearing, the district court held that the settlement in the first action was unenforceable because there was no meeting of the minds between Nationwide and T & D. It then held that its ruling on the counterclaim rendered the complaint in the interpleader action moot. In addition, the district court stated that it would dismiss the claims of any defendant in the inter-pleader action who was unable to show that its claim did not depend on the settlement agreement and that the district court had subject matter jurisdiction over its claim.
The district rejected the arguments advanced by Supreme in its brief opposing dismissal and dismissed its counterclaims with prejudice. This appeal followed.
Because Supreme’s brief focuses exclusively on the district court’s reasons for dismissing its claim based on its position as an assignee of T & D, we conclude that it is only seeking a reversal of the district court’s dismissal of that counterclaim. We will therefore only consider the propriety of the district court’s action in dismissing this counterclaim.
II.
The district court expressed two reasons for dismissing the counterclaim at issue in this appeal. First, the court interpreted Supreme’s counterclaim as depending on the settlement. Although Supreme has argued that this interpretation is incorrect, it has *687not specified whether we are to review this determination for error, clear error, or abuse of discretion. However, we need not resolve this issue because, under any of these standards of review, we would be compelled to reject the district court’s view of Supreme’s counterclaim.
Although it did not directly address the issue of the independence of its counterclaim in its brief opposing dismissal, Supreme, an assignee, stated that the counterclaiming assignees opposed the settlement. More importantly, in its answer, Supreme stated that the assignees had no claim against the settlement fund because they were not parties to that agreement. Thus, it is clear that Supreme was asserting a claim based on the insurance policy rather than the settlement. Its claim did not, therefore, depend on the settlement.
The district court’s second reason for dismissing Supreme’s counterclaim was that it was not supported by a basis for jurisdiction that was independent of the complaint since Supreme sought to recover less than $10,000. The court viewed Supreme’s argument that there was ancillary jurisdiction as irrelevant.
If a district court has jurisdiction over a complaint, it has ancillary jurisdiction over any counterclaim that arises out of the same transaction or occurrence that is the subject matter of the complaint. Great Lakes Rubber Corp. v. Herbert Cooper Co., 286 F.2d 631 (3d Cir.1961). However, the district court apparently thought that the mootness of the interpleader action deprived it of any ancillary jurisdiction over Supreme’s counterclaim that it might otherwise have had.
For a number of reasons, we believe that the mooting of Nationwide’s complaint did not divest the court of jurisdiction over any counterclaims that arose out of the same transaction or occurrence as the complaint. First, the policies of conservation of judicial resources and the avoidance of a multiplicity of litigation should be important in shaping the contours of ancillary jurisdiction. See Consolo v. Federal Maritime Commission, 383 U.S. 607, 86 S.Ct. 1018, 16 L.Ed.2d 131 (1965) (considerations of judicial economy and fairness underlie ancillary jurisdiction); Great Lakes Rubber Corp. v. Herbert Cooper, Inc., 286 F.2d 631 (3d Cir.1961) (ancillary jurisdiction intended to abolish piecemeal litigation); 6 C. Wright & A. Miller, Federal Practice and Procedure § 1414, at 73 (1971). Mootness may occur after the parties have invested substantial resources in the litigation. Holding that mootness that occurs after the complaint and counterclaim are filed divests the court of ancillary jurisdiction would, therefore, conflict with these important policies.
The Supreme Court has recognized that these same policies underlie the related doctrine of pendent jurisdiction. In Rosado v. Wyman, 397 U.S. 397, 90 S.Ct. 1207, 25 L.Ed.2d 442 (1969), the Supreme Court considered the question whether mootness of a plaintiff’s federal claim that occurred after the complaint was filed divested the court of pendent jurisdiction over the plaintiff’s state law claim. The Court recognized the conflict between the policies of pendent jurisdiction and a requirement that jurisdiction over the main claim exist at all stages of the litigation. It therefore held that mootness of a plaintiff’s federal claim that arose after the complaint was filed did not divest the court of pendent jurisdiction over the state claim. Thus, Rosado provides strong support for the adoption of a similar rule in ancillary jurisdiction.
The rule we adopt today is also supported by analogy to the doctrine that in a diversity case events occurring subsequent to the filing of the complaint that reduce the amount in controversy below the statutory limit do not oust the court’s jurisdiction. Wade v. Rogala, 270 F.2d 280 (3d Cir.1959). In the instant case, the complaint put in issue an amount greater than $10,000, but Supreme’s counterclaim did not. Mootness of the complaint therefore had the effect of reducing the amount in controversy in this case. Analogy to the rule expressed in Rogala therefore suggests that mootness of the complaint, which reduced the amount in controversy, should not destroy ancillary jurisdiction.
*688Finally, we note that the view that mootness occurring after the filing of a complaint and the counterclaim does not rob a court of ancillary jurisdiction over the counterclaim is consistent with the doctrine that power to adjudicate an ancillary claim generally survives the defeat of the principal claim on the merits. Pennsylvania Railroad Co. v. Erie Avenue Warehouse Co., 302 F.2d 843, 846 (3d Cir.1962). It is also consistent with the doctrine that the existence of diversity jurisdiction is generally determined by the facts that existed at the time the complaint was filed. Field v. Volkswagenwerk AG, 626 F.2d 293 (3d Cir.1980). We therefore hold that at least where mootness occurs after the complaint and the counterclaim are filed, it does not defeat the court’s ancillary jurisdiction.
We are aware that a complaint over which the court did not have jurisdiction at the time it was filed cannot support the exercise of ancillary jurisdiction. Pennsylvania Railroad, supra, at 845. We recognize that this doctrine may require a different result in a case in which events occurring prior to the filing of the complaint render the case moot when the complaint is filed. In such a case, the parties lose their stake in the outcome of the action before the complaint is filed. By contrast, in the instant case, the parties did not lose their stake until the district court declared the agreement unenforceable. Thus, we are not presented with a case in which the complaint was moot when it was filed. Nor is this a case in which the plaintiff’s claim became moot before the counterclaim was filed. We therefore hold that if Supreme’s counterclaim arose out of the same transaction or occurrence as Nationwide’s complaint, the district court had ancillary jurisdiction over the counterclaim.
Because the district court did not consider whether the counterclaim arose out of the same transaction or occurrence as Nationwide’s complaint, we will remand for the district court to make this determination. We of course express no view about any discretion the district court may have either to dismiss the claim or to allow it to proceed to trial should it determine that it has jurisdiction.
III.
The order of the district court will be vacated and the case remanded for proceedings not inconsistent with this opinion.