
    GARANTI FINANSAL KIRALAMA A.S., Plaintiff-Appellant, v. AQUA MARINE AND TRADING INC., Defendant-Appellee.
    Docket Nos. 11-631-cv(L), 11-3360(con).
    United States Court of Appeals, Second Circuit.
    Argued: May 21, 2012.
    Decided: Oct. 2, 2012.
    
      Joseph Francis De May, Jr., Cichanowicz, Callan, Keane, Vengrow & Textor, LLP, New York, NY, for Plaintiff-Appellant.
    William Robert Bennett, III, Bennett, Giuliano, McDonnell & Perrone, LLP, New York, NY, for Defendant-Appellee.
    Before: PARKER, HALL, WALLACE, Circuit Judges.
    
      
      . The Honorable J. Clifford Wallace, United States Court of Appeals for the Ninth Circuit, sitting by designation.
    
   HALL, Circuit Judge:

Plaintiff-Appellant Garantí Finansal Kiralama A.S. (“GFK”) appeals from the district court’s dismissal of its action for a declaratory judgment that it was not contractually bound to arbitrate with Defendant-Appellee Aqua Marine & Trading, Inc. (“AM”). Concluding that the district court prematurely resolved disputed factual issues, we vacate the district court’s judgment that dismisses the case and remand the case for further proceedings.

1. Background

AM is a Nevis, West Indies, corporation that supplies marine shipping fuel, called “bunkers” in the industry. By letter dated June 18, 2010, it initiated arbitration in New York against GFK, a Turkish financial corporation, demanding to be paid for bunkers delivered to two vessels owned by GFK, the M/V CEMREM and the M/V SEMA ANA. AM’s asserted grounds for arbitration were order confirmation contracts, which AM had issued with the bunkers, specifying that any dispute over any of the contracts were to be resolved by a panel of three New York-based arbitrators under the rules of the Society of Maritime Arbitrators.

GFK wanted to avoid arbitration. Asserting admiralty jurisdiction, it filed this action in federal court, seeking a declaratory judgment that it was not bound to arbitrate because it was not a party to AM’s contract. Indeed, there appears to be no dispute that GFK itself did not sign the order confirmations. Rather, an entity called CMR Denizcilik Veticaret A.S. (“CMR”) signed “as manager on behalf of the registered owners.” In its complaint, GFK strenuously disputed that CMR was its “manager” or had otherwise been authorized to act as GFK’s agent. Instead, GFK claimed that it had leased the two merchant vessels to non-party shipping companies (the “Charterers”) under bare-boat charters and that the Charterers, in turn, may have hired CMR to manage their boats. “If [CMR] acted in an agency capacity, it was likely as agent for the [Charterers],” but it was “not plaintiffs agent and did not act on plaintiffs behalf.”

The district court issued AM an order to show cause and heard both parties’ arguments. GFK did not dispute its ownership of the vessels. It emphatically repeated its position, however, that it did not have to arbitrate because it was not a party to any of AM’s bunker contracts. In GFK’s view, the lease agreement with the Charterers meant GFK “retained bare legal title, but the possession, navigation and control of the ships passed to the [Charterers].”

AM, for its part, argued that GFK was bound by the contract as a matter of law. Referencing both GFK’s complaint and AM’s own submissions to the district court, AM pointed out that CMR, on the order confirmation, had identified itself as GFK’s “manager.” AM included a fuel contract from another supplier in which CMR had also listed itself under the rubric “managers and/or operators/charterers” of the CEMREM. Another document, an “inventory report” from the government of Mauritius, also identified CMR as “manager” of the CEMREM. AM further submitted two insurance certificates on the CEMREM issued jointly to GFK and “CMR ... as Managers.” To counter GFK’s view that it had given the Charterers only bareboat charters, AM supplied an affidavit from an attorney in Panama, where the vessels were flagged, averring that: (1) GFK was the registered owner of the vessels pursuant to the Panama Public Registry; and (2) no bareboat charter or other leasing contract had been registered for the vessels. Many of the other documents AM submitted showed that GFK was the registered owner of the vessels, but all were silent as to any chartering, leasing, or management arrangements into which GFK had entered. AM’s counsel stated at argument that, comparing all these documents to what GFK had produced, “the balance of the preponderance of the evidence” suggested that “CMR is GFK’s agent.”

The district court agreed and dismissed the case from the bench. Citing the federal “policy in favor of arbitration,” the court found that GFK had “failed to meet [its] burden” of showing that it was not bound by the contract. In the court’s view, it was “more likely than not that CMR was functioning as the agent for GFK and not for the lessee or bareboat charterer,” and thus “there is a contract that exists here between Aqua Marine and GFK and/or GFK’s agent.”

GFK subsequently submitted a letter requesting “a pre-motion conference with a view to making a Rule 60(b)(2) motion to reopen the case on grounds of newly discovered evidence.” This was in accordance with the district court’s individual rules of practice, which require any party wanting to make a motion to “submit a letter, not to exceed three (3) pages in length, setting forth the basis for the anticipated motion.” Instead of treating GFK’s submission as such a letter, however, the court treated it as the Rule 60(b) motion itself and denied it.

GFK timely appeals the summary dismissal of its case, the construal of its letter submission as a Rule 60(b) motion, and the denial thereof.

II. Discussion

This action, although filed under the Declaratory Judgment Act (“DJA”), 28 U.S.C. § 2201, is governed by the Federal Rules of Civil Procedure like any other civil action. See Fed.R.Civ.P. 57. “The incidents of pleading, process, discovery, trial, and judgment are the same.” 10B Charles Alan Wright, et al., Federal Practice & Procedure § 2768 (3d ed.2012). Consequently, the district court’s dismissal of GFK’s complaint on the pleadings was, although not styled as such, in effect a sua sponte decision to grant summary judgment under Fed.R.Civ.P. 56(a). We review that decision de novo, drawing all inferences in favor of the non-moving party. See Schwan-Stabilo Cosmetics GmbH & Co. v. Pacificlink Int’l Corp., 401 F.3d 28, 33 (2d Cir.2005). Summary judgment is proper only when, construing the evidence in the light most favorable to the non-movant, “there is no genuine dispute as to any material fact and the movant is entitled to judgment as a matter of law.” Doninger v. Niehoff, 642 F.3d 334, 344 (2d Cir.2011) (quoting Rule 56(a)).

“District courts have the discretion to grant summary judgment sua sponte, even without notice in certain circumstances.” See Schwan-Stabilo, 401 F.3d at 33.

In granting summary judgment sua sponte, however, a district court must determine that the party against whom summary judgment is rendered has had a full and fair opportunity to meet the proposition that there is no genuine issue of material fact to be tried.... [District courts are widely acknowledged to possess the power to enter summary judgment sua sponte, so long as the losing party was on notice that it had to come forward with all of its evidence. Before granting summary judgment sua sponte, the district court must assure itself that following the procedures set out in Rule 56 would not alter the outcome. Discovery must either have been completed, or it must be clear that further discovery would be of no benefit. The record must, therefore, reflect the losing party’s inability to enhance the evidence supporting its position and the winning party’s entitlement to judgment.

Priestley v. Headminder, Inc., 647 F.3d 497, 504 (2d Cir.2011) (per curiam) (citations, alterations, and quotation marks omitted). “It is thus well established that before a district court may properly grant a motion for summary judgment, certain procedural protections must first be afforded to the non-moving party.” Id.

A. Subject-Matter Jurisdiction

Federal courts “are courts of limited jurisdiction whose power is limited strictly.” Ahmed v. Holder, 624 F.3d 150, 154 (2d Cir.2010) (quotation marks omitted). There is always a “presumption against jurisdiction.” Miller v. United States, 78 U.S. 268, 299, 11 Wall. 268, 20 L.Ed. 135 (1870); see also 13 Charles Alan Wright, et al., Federal Practice & Procedure § 3522 (3d ed.2012). Thus, although Article III of the United States Constitution rather broadly extends the “judicial Power ... to all Cases of admiralty and maritime Jurisdiction,” see U.S. Const. Art. III, § 2, venerable case law limits that jurisdiction only to maritime torts and maritime contracts, see Goumas v. K. Karras & Son, 140 F.2d 157, 157 (2d Cir.1944).

No one in this case alleges a maritime tort. “[T]he delegation of cognizance of ‘all civil cases of admiralty and maritime jurisdiction’ to the courts of the United States ... extends over all contracts, (wheresoever they may be made or executed, or whatsoever may be the form of the stipulations,) which relate to the navigation, business or commerce of the sea.” DeLovio v. Boit, 7 F.Cas. 418, 444 (C.C.D.Mass.1815) (No. 3,776) (Story, J.) (emphasis added). Thus, whether a contract is a “maritime contract” supporting admiralty jurisdiction “depends upon the nature and character of the contract, and the true criterion is whether it has reference to maritime service or maritime transactions.” Norfolk S. Ry. Co. v. Kirby, 543 U.S. 14, 24, 125 S.Ct. 385, 160 L.Ed.2d 283 (2004).

Both parties, as well as the district court, simply assumed that the court had admiralty jurisdiction over this case. The case does, after all, involve two maritime transportation companies arguing over a fuel contract — at first glance, a quintessential admiralty action. The way GFK framed its complaint, however, raises a real jurisdictional question, one which we must consider nostra sponte. See Kalson v. Paterson, 542 F.3d 281, 286 (2d Cir. 2008) (“The fact that neither party raised a jurisdictional issue on appeal is of no matter; we are obligated to determine whether jurisdiction exists nostra sponte.”). GFK, as the party asserting subject-matter jurisdiction, has the burden of proving its existence by a preponderance of the evidence. See Morrison v. Nat’l Austl. Bank Ltd., 547 F.3d 167, 170 (2d Cir.2008). But GFK’s entire goal in federal court is to disprove that it is bound by any contract to AM. It says there is no contract at all with AM, much less any maritime contract. The Supreme Court’s usual description, that federal courts have admiralty jurisdiction “over contracts,” see, e.g., Exxon Corp. v. Cent. Gulf Lines, Inc., 500 U.S. 603, 603, 111 S.Ct. 2071, 114 L.Ed.2d 649 (1991); Kossick v. United Fruit Co., 365 U.S. 731, 735, 81 S.Ct. 886, 6 L.Ed.2d 56 (1961), would seem to preclude a plaintiff from in one breath invoking admiralty and in the next disclaiming the contract that serves as its basis. We need not reach the open question of whether admiralty jurisdiction extends narrowly to actual maritime contracts or broadly to maritime contract issues. If AM, the declaratory judgment defendant, had instead brought an action as plaintiff to collect on the contracts, the district court unquestionably would have had admiralty jurisdiction. This declaratory judgment action is the mirror image of that suit, and the district court thus had admiralty jurisdiction here too.

Our answer derives from fact that declaratory judgment actions are governed by special subject-matter jurisdiction rules. By enacting the DJA, Congress expanded access to the federal courts by creating a brand-new federal remedy. The statute “meets a real need,” which is “to afford a speedy and inexpensive method of adjudicating legal disputes without invoking the coercive remedies of the old procedure, and to settle legal rights and remove uncertainty and insecurity from legal relationships without awaiting a violation of the rights or a disturbance of the relationships.” Beacon Constr. Co. v. Mateo Elec. Co., 521 F.2d 392, 397 (2d Cir.1975); see also Dow Jones & Co. v. Harrods, Ltd., 237 F.Supp.2d 394, 406 (S.D.N.Y.2002) (by allowing courts to define legal relationships early in a dispute, the DJA keeps disputes from “escalating into additional wrongful conduct,” and “promotes several utilitarian values in the adjudication of disputes: speed, economy and effectiveness”), affirmed 346 F.3d 357 (2d Cir.2003). An action brought under the DJA is, in most respects, just like any other civil action. See Fed.R.Civ.P. 57 (“The [Federal Rules of Civil Procedure] govern the procedure for obtaining a declaratory judgment under 28 U.S.C. § 2201.”); 10B Charles Alan Wright et al., Federal Practice & Procedure § 2768 (3d ed. 2012) (“Any doubt or difficulty about the procedure in actions for a declaratory judgment disappears if the action is regarded as an ordinary civil action, as Rule 57 clearly intends. The incidents of pleading, process, discovery, trial, and judgment are the same.”). One thing the DJA did not do, however, was expand the federal courts’ subject-matter jurisdiction. Skelly Oil v. Phillips Petroleum, 339 U.S. 667, 671, 70 S.Ct. 876, 94 L.Ed. 1194 (1950). Neither we nor Congress may do that, for the Constitution alone defines the outer limits of subject-matter jurisdiction. See Marbury v. Madison, 5 U.S. (1 Cranch) 137, 138, 2 L.Ed. 60 (1803). “The operation of the Declaratory Judgment Act is procedural only.” Skelly Oil, 339 U.S. at 671, 70 S.Ct. 876 (quotation marks and alteration omitted).

In Skelly Oil, the parties presented the Court with an unusual jurisdictional scenario. Phillips Petroleum, the eventual declaratory judgment plaintiff, had contracted with Skelly Oil to purchase natural gas. Id. at 669, 70 S.Ct. 876. The contract, however, was conditional on a third party obtaining a “certificate of public convenience and necessity,” essentially a pipeline construction and operation permit, from the Federal Power Commission. Id. That permit issued but contained several unanticipated requirements that Skelly did not like. Skelly therefore terminated the contracts on the ground that the permit was not actually an adequate “certificate of public convenience and necessity.” Id. at 669-70, 70 S.Ct. 876. Phillips, in response, brought a federal suit under the DJA, seeking a declaration that the contract was binding because, under the relevant federal statute, the permit was, in fact, a “certificate of public convenience and necessity.” Id. at 670, 70 S.Ct. 876. The Supreme Court held that there was no federal-question jurisdiction because, had the suit before it been presented as a coercive suit— i.e., a breach of contract action by Phillips against Skelly — the federal question would have arisen only as Skelly’s defense to Phillips’s state-law claim. Id. at 672, 70 S.Ct. 876. In other words, if the case had come before the court in a traditional posture, it would have been barred by the familiar well-pleaded complaint rule. See, e.g., Louisville & Nashville R.R. Co. v. Mottley, 211 U.S. 149, 152, 29 S.Ct. 42, 53 L.Ed. 126 (1908) (“It is not enough [to establish jurisdiction] that the plaintiff alleges some anticipated [federal] defense to his cause of action.... Although such allegations show that very likely, in the course of the litigation, a question under the Constitution would arise, they do not show that the suit, that is, the plaintiff’s original cause of action, arises under the Constitution.”). While Phillips, the plaintiff in Skelly Oil, had filed a complaint which included a federal question on its face, the Supreme Court reasoned that hearing the suit would allow an end-run around the well-pleaded complaint rule. The Court emphatically declined to take such a course, which, in its view, “would contravene the whole trend of jurisdictional legislation by Congress, disregard the effective functioning of the federal judicial system and distort the limited procedural purpose of the Declaratory Judgment Act.” 339 U.S. at 673-74, 70 S.Ct. 876.

Skelly Oil teaches us that, “if, but for the availability of the declaratory judgment procedure, the federal claim would arise only as a defense to a state created action, jurisdiction is lacking.” Franchise Tax Bd. of State of Cal. v. Constr. Laborers Vacation Trust for S. Cal., 463 U.S. 1, 16, 103 S.Ct. 2841, 77 L.Ed.2d 420 (1983). In practice, Skelly Oil means that when we determine subject-matter jurisdiction for a DJA suit, we must conceptually realign the declaratory judgment parties and claims and analyze them as they would appear in a coercive suit. Thus, in Public Service Commission of Utah v. Wycoff Co., 344 U.S. 237, 73 S.Ct. 236, 97 L.Ed. 291 (1952), when a company that transported films between various points within Utah sought a declaratory judgment in that a state regulatory commission had no power to forbid it to transport over routes authorized by the Interstate Commerce Commission, the Court explained that, in assessing jurisdiction, “it is the character of the threatened action, and not of the defense, which will determine whether there is federal-question jurisdiction in the District Court.” Id. at 243, 73 S.Ct. 236. Similarly, in Franchise Tax Board, in which California’s tax-collection agency sued an employee-benefit trust seeking recovery of certain taxes and a declaratory judgment that ERISA did not preempt California’s ability to obtain payment, see 463 U.S. at 4, 103 S.Ct. 2841, the Supreme Court held that subject-matter jurisdiction was lacking because the ERISA preemption issue, although couched in declaratory judgment terms, was really just a prospective federal defense, see id. at 21-22, 103 S.Ct. 2841. As Wycoff noted, “in many actions for declaratory judgment, the realistic position of the parties is reversed.” 344 U.S. at 248, 73 S.Ct. 236. Citing Wycoff and Shelly Oil, we have summarized the law as follows: “a complaint seeking a declaratory judgment is to be tested, for purposes of the well-pleaded complaint rule, as if the party whose adverse action the declaratory judgment plaintiff apprehends had initiated a lawsuit against the declaratory judgment plaintiff.” Fleet Bank, N.A. v. Burke, 160 F.3d 883, 886 (2d Cir.1998).

Importantly, although Shelly Oil and its canonical progeny are doctrines of federal-question jurisdiction, their core principle— that, in determining jurisdiction, we realign the declaratory judgment claims and parties as they would appear in a coercive suit — has been extended to the diversity jurisdiction context as well. See Hunt v. Wash. State Apple Adver. Comm’n, 432 U.S. 333, 347, 97 S.Ct. 2434, 53 L.Ed.2d 383 (1977) (“In actions seeking declaratory or injunctive relief, it is well established that the amount in controversy is measured by the value of the object of the litigation.”); Webb v. Investacorp, Inc., 89 F.3d 252, 256 (5th Cir.1996) (amount in controversy in declaratory judgment action determined by amount disputed in underlying arbitration proceeding); City of Moore, Okla v. Atchison, Topeka, & Santa Fe Ry. Co., 699 F.2d 507, 509 (10th Cir. 1983); Beacon Constr., 521 F.2d at 399 (in a declaratory judgment action, “the amount in controversy is not necessarily the money judgment sought or recovered, but rather the value of the consequences which may result from the litigation”); see also Developments in the Law: Declaratory Judgments—1941-1949, 62 Harv. L.Rev. 787, 801 (1949) (to determine the amount in controversy in a declaratory action premised on diversity jurisdiction, courts look to the “potential monetary value of the right, or amount of the liability,” in “a present or potential coercive action”).

No federal appeals court has ever squarely applied Shelly Oil to an analysis of admiralty jurisdiction. In some respects, admiralty jurisdiction is much different from the other two bases for federal subject-matter jurisdiction. For one thing, the well-pleaded complaint rule, the conceptual backbone of Skelly Oil, is partially inapplicable in admiralty. See Fed.R.Civ.P. 9(h). Rule 9(h) provides that, if a claim for relief falls within the federal courts’ admiralty jurisdiction, but is also within the court’s subject-matter jurisdiction on some other ground — oftentimes, diversity of citizenship, see, e.g., Bodden v. Osgood, 879 F.2d 184, 186 (5th Cir.1989)— a plaintiff must explicitly designate the claim as an admiralty claim or else forego admiralty’s special procedures and remedies, see Continental Casualty Co. v. Anderson Excavating & Wrecking Co., 189 F.3d 512, 517 (7th Cir.1999). Only if admiralty is the sole possible jurisdictional basis is the Rule 9(h) designation unnecessary. See Baris v. Sulpicio Lines, Inc., 932 F.2d 1540, 1547 (5th Cir.1991). Second, because Skelly Oil is a doctrine of federal-question jurisdiction, a major part of the usual inquiry under Skelly Oil is determining whether the hypothetical “mirror image” coercive suit would be invoking state law or federal and whether in

such a suit the declaratory judgment plaintiff would be asserting a “federal defense.” The notions of “state-law claims” and “federal defenses” have no analog in admiralty, for once a federal court exercises admiralty jurisdiction, only federal maritime law— generally federal common law — applies. Woodward Governor Co. v. Curtiss Wright Flight Sys., Inc., 164 F.3d 123, 126 (2d Cir.1999); see also, e.g., S. Pac. Co. v. Jensen, 244 U.S. 205, 215, 37 S.Ct. 524, 61 L.Ed. 1086 (1917), superseded by statute as stated in Dir., Office of Workers’ Comp. Programs, U.S. Dep’t of Labor v. Perini N. River Assocs., 459 U.S. 297, 306, 103 S.Ct. 634, 74 L.Ed.2d 465 (1983); see generally The Lottawanna, 88 U.S. (21 Wall.) 558, 22 L.Ed. 654 (1874); Robert Force, Federal Judicial Center, Admiralty & Maritime Law 21 (2004). Third, in addition to vesting admiralty jurisdiction in the federal courts, 28 U.S.C. § 1333 “sav[es] to suitors in all cases all other remedies to which they are otherwise entitled,” which means that plaintiffs who have viable admiralty claims may choose to pursue them in state court, either under federal law or under other laws. In other words, when it comes to analyzing admiralty jurisdiction, applying the Skelly Oil “role reversal” technique results in an analysis that may be more speculative than in the traditional context, for even if the hypothetical coercive suit could be brought in federal court as an admiralty case, there are several reasons it would not be.

Despite these differences, we think the animating principle of Skelly Oil extends to declaratory judgment actions brought at admiralty as well. The DJA, above all else, finds its justification in principles of “speed, economy and effectiveness.” See Dow Jones & Co., 237 F.Supp.2d at 406. By allowing us to define core legal relationships and responsibilities well before a fully formed legal case is presented — indeed, before a coercive suit might even be possible — we ensure a more rapid resolution of such disputes, we refine and narrow the issues to be litigated in an eventual coercive suit, and, by providing an alternate dispute resolution method, we may even keep some full-blown lawsuits from occurring. All this saves the parties (and the courts) time, effort, and money. In other words, the DJA’s underlying rationale is, in large part, structural. Skelly Oil builds on and complements that structural goal by requiring us to examine the structure of the suit that would ultimately take place if it were not forestalled by the declaratory judgment action. If that suit could not be brought in federal court, we do not have jurisdiction in the analogous declaratory judgment action. Skelly Oil, 339 U.S. at 673-74, 70 S.Ct. 876. If the suit could be brought in federal court, we have jurisdiction under the DJA. Wycoff, 344 U.S. at 248, 73 S.Ct. 236; Fleet Bank, 160 F.3d at 886.

If Skelly Oil’s simple and effective analysis applied only to federal-question jurisdiction, many admiralty litigants (and judges hearing admiralty cases) would miss out on the salutary effects of the DJA. Such asymmetry would be contraindicated, given the federal government’s pervasively strong interest in having admiralty disputes resolved in federal court. Cf. Foremost Ins. Co. v. Richardson, 457 U.S. 668, 677, 102 S.Ct. 2654, 73 L.Ed.2d 300 (1982); Jensen, 244 U.S. at 215, 37 S.Ct. 524; The Lottawanna, 88 U.S. (21 Wall.) at 575. An admiralty exception to Skelly Oil “would also contravene the well settled rule that the Declaratory Judgment Act should be liberally construed to accomplish its purpose of providing a speedy and inexpensive method of adjudicating legal disputes without invoking coercive remedies and that it is not to be interpreted in any narrow or technical sense.” Sherwood Med. Indus., Inc. v. Deknatel, Inc., 512 F.2d 724, 729 (8th Cir.1975); see also Beacon Constr., 521 F.2d at 397 (“The statute providing for declaratory judgments ... should be liberally construed to accomplish the purpose intended, i.e. to afford a speedy and inexpensive method of adjudicating legal disputes without invoking the coercive remedies of the old procedure, and to settle legal rights and remove uncertainty and insecurity from legal relationships without awaiting a violation of the rights or a disturbance of the relationships.” (quotation marks omitted)). In sum, the rationale of cases like Shelly Oil, Wycoff, and Textron Lycoming, while based in federal-question jurisdiction, applies just as strongly — if not more so — to admiralty cases. Although GFK, the plaintiff in this case, disclaims the existence of a maritime contract, there is no question but that we would have jurisdiction over AM’s hypothetical coercive suit to enforce the contract. Thus we have jurisdiction over this declaratory judgment action as well.

B. Merits

In the district court, and especially on appeal, both parties advanced a host of arguments about principles of arbitration and of maritime lease law. None of those arguments are dispositive, however, because GFK’s complaint does not challenge the validity of the fuel contract’s arbitration provision itself. Indeed, GFK never denies that CMR must arbitrate under the contracts but instead argues that CMR could not bind GFK to the contracts. This case, then, stands or falls on agency principles. On the merits, the parties’ submissions to the district court do create a genuine issue of material fact regarding agency — as the district court recognized— and thus AM was not entitled to judgment as a matter of law. Accordingly, we vacate the district court’s summary judgment in AM’s favor.

In admiralty, whether one party has authority to bind another to a maritime contract is a question of general maritime law. See Atl. & Gulf Stevedores, Inc. v. Revelle Shipping Agency, Inc., 750 F.2d 457, 459 (5th Cir.1985); see also Kirno Hill Corp. v. Holt, 618 F.2d 982, 985 (2d Cir.1980) (“Federal maritime law, which is the law we apply in an admiralty case, embraces the principles of agency....”). An agent can have actual authority, see Interocean Shipping Co. v. National Shipping & Trading Corp., 523 F.2d 527, 537 (2d Cir.1975), meaning explicit permission from the principal to act on its behalf, see Restatement (Third) of Agency § 2.01 (2006), or apparent authority, by which the agent can “affect [the] principal’s legal relations with [a] third part[y] when a third party reasonably believes the actor has authority to act on behalf of the principal and that belief is traceable to the principal’s manifestations,” id.-, see also The Capitaine Faure, 10 F.2d 950, 963 (2d Cir.1926). Generally, the existence of either actual or apparent authority is a question of fact, revolving as it does around the actions by, and relationships between, principal, agent, and third parties. See Interocean Shipping, 523 F.2d at 537; see also Nat’l Football Scouting Inc. v. Cont’l Assur. Co., 931 F.2d 646, 649 (10th Cir. 1991) (“The question of agency, be it on the basis of actual authority or apparent authority, is ordinarily a question of fact.”). Thus, the existence and scope of an agency relationship can be resolved as a matter of law only if: (1) the facts are undisputed; or (2) there is but one way for a reasonable jury to interpret them. See Brunswick Leasing Corp. v. Wisc. Cent., Ltd., 136 F.3d 521, 526 (7th Cir.1998).

The issue of agency in this declaratory judgment action, furthermore, presents itself as an affirmative defense that AM has to prove. While agency is usually an element of the plaintiffs case-in-chief, in this declaratory judgment action GFK, the plaintiff, denies it is a party to any contract with AM. Strictly speaking, that is true — GFK and AM never had any contact at all. But AM asserts that CMR, with whom it did have a contract, was acting on GFK’s behalf. Thus, to defend against GFK’s claims and preserve its right to proceed in arbitration, AM must prove its affirmative defense — that CMR is GFK’s agent. This is the rare case where agency is an affirmative defense. See Saks v. Franklin Covey Co., 316 F.3d 337, 350 (2d Cir.2003) (“An affirmative defense is defined as a defendant’s assertion raising new facts and arguments that, if true, will defeat the plaintiffs or prosecution’s claim, even if all allegations in the complaint are true.” (quotation marks and alterations omitted)); 5 Charles Alan Wright, et al., Federal Practice & Procedure § 1271 (3d ed.2012); see also Schock v. United States, 254 F.3d 1, 6 (1st Cir. 2001); Marine Overseas Servs., Inc. v. Crossocean Shipping Co., Inc., 791 F.2d 1227, 1233 (5th Cir.1986); Rayonier, Inc. v. Poison, 400 F.2d 909, 923 (9th Cir.1968); Muscletech Research & Dev., Inc. v. E. Coast Ingredients, LLC, No. 00-CV-753A, 2004 WL 2191578, at *1 (W.D.N.Y. Sept. 27, 2004). What this means, of course, is that AM has the burden of proving that agency relationship — not, as AM argues, the other way around. See Sari Louis Feraud Int’l. v. Viewfinder, Inc., 489 F.3d 474, 484 (2d Cir.2007) (the burden of proving an affirmative defense is on its proponent).

Summarizing the evidence AM submitted, it is clear that the district court should not have granted summary judgment. To prove CMR could contractually bind GFK, AM had to show, inter alia, that CMR had actual or apparent authority to act on GFK’s behalf. It failed to demonstrate the absence of a material dispute of fact regarding either type of authority.

Nothing in the record unequivocally shows that CMR had actual authority to act for GFK. AM points to the leasing agreements between GFK and the Charterers, emphasizing that GFK “retained” numerous rights vis-á-vis the vessels and calling into question GFK’s view that the leasing agreements were true demise charters. Beyond the fact that, as GFK argues, the meaning of those agreements is deeply ambiguous (especially because they were made pursuant to Turkish law which neither party fully explained to the district court), there are three reasons they do not prove actual authority as a matter of law. First, the agreements are between GFK and the ChaHerers, not CMR. Thus AM actually is faced with proving double agency — that the Charterers had authority to bind GFK to a contract with CMR, and that that contract, in turn, provided CMR authority to bind GFK to a contract with AM. AM has provided no evidence to that effect. Second, even if somehow we could assume CMR worked for the Charterers, the agreements almost exclusively set forth the Charterers’ relationship with the vessels, not with GFK. Third, and most importantly, AM’s argument makes a major, and unwarranted, assumption — that because GFK, in the leasing agreement, allegedly “retained” a variety of rights, necessarily CMR was acting on GFK’s behalf, not on its own. There is no basis in the record, at this point in the litigation, for making that inferential leap.

AM’s evidence that CMR had apparent authority to act for GFK is somewhat less inchoate, consisting mostly of documents in which CMR held itself forth as “managers” for GFK. Unfortunately for AM, however, that evidence is totally irrelevant. Just as under the general common law, see Restatement (Third) of Agency § 2.03 (2006), “under maritime law, apparent authority cannot be evidenced by statements of an agent alone,” Coastal Drilling Co., L.L.C. v. Shinn Enterprises, Inc., Civil Action No. 05-4007, 2008 WL 907520, at *2 (E.D.La. Mar. 31, 2008); cf. Kirno Hill, 618 F.2d at 985 (federal maritime law employs general agency principles). In other words, what matters is not how CMR held itself out, but whether GFK held CMR out as its authorized agent. To recover against a principal on an apparent authority theory, it is crucial to prove the “principal was responsible for the appearance of authority in the agent.” Herbert Constr. Co. v. Cont’l Ins. Co., 931 F.2d 989, 994 (2d Cir. 1991) (emphasis added) (citing New York law); see also Dinaco, Inc. v. Time Warner, Inc., 346 F.3d 64, 69 (2d Cir.2003) (“Apparent authority arises from the written or spoken words or any other conduct of the principal which, reasonably interpreted, causes a third person to believe that the principal consents to have an act done on his behalf by the person purporting to act for him.” (emphasis added)). GFK’s complaint disclaimed: (1) that CMR was its agent; (2) that it had any contract with CMR; and (3) that it had ever “appoint[ed], compensated, or controlled]” CMR. GFK stated that “CMR was not [GFK’s] agent and did not act on [its] behalf----” All AM submitted that even plausibly constitutes a representation by GFK about CMR are two insurance certificates on the CEMREM issued jointly to GFK and “CMR ... as Managers.” GFK, relying on evidence in the record, disputes the facts to be drawn from those documents. Even more importantly, using the documents to reach the conclusion that GFK thus held CMR out as its agent, while not necessarily impermissible, requires an inference to be drawn against GFK. In the district court’s analysis, however, all inferences should have been drawn in GFK’s favor.

As we previously explained, the district court’s treatment of this case was tantamount to a grant of summary judgment. We certainly appreciate the district court’s efforts, in the spirit of the DJA, to streamline the proceedings and resolve the case quickly. Nevertheless, after reviewing the record before us, there remain facts in dispute regarding the critical issue of CMR’s agency. While AM might eventually prevail on its theory that CMR was authorized to act for GFK, at this point, there simply is not enough in the record to prove that proposition as a matter of law.

Given our resolution of this appeal, the question of whether the district court should have granted GFK’s motion to reopen is moot.

III. Conclusion

For the foregoing reasons, the judgment of the district court is VACATED and the case is REMANDED. 
      
      . Because the district court dismissed this case on the pleadings, we recite the facts as found in GFK’s complaint.
     
      
      . Interestingly, one document AM submitted, an entry from the ClassNK Register of Ships, identified a different "management company” — Horizon Gemi Isletmeciligi Sanayi ve Ticaret A.S. (although this form postdates the disputed fuel sales).
     
      
      . Although it was based on the pleadings alone, the district court’s dismissal cannot be construed as a Fed. R. Civ. 12(c) dismissal because it considered matters outside the pleadings, specifically, the affidavits and exhibits AM had submitted. See Fed.R.Civ.P. 12(d) ("If, on a motion under Rule 12(b)(6) or 12(c), matters outside the pleadings are presented to and not excluded by the court, the motion must be treated as one for summary judgment under Rule 56.”). "In certain circumstances, the court may permissibly consider documents other than the complaint in ruling on a motion under Rule 12(b)(6).” Roth v. Jennings, 489 F.3d 499, 509 (2d Cir. 2007). "Documents that are attached to the complaint or incorporated in it by reference are deemed part of the pleading and may be considered.” Id. "In addition, even if not attached or incorporated by reference, a document upon which the complaint solely relies and which is integral to the complaint may be considered....” Id. (alterations omitted). "Courts may also properly consider matters of which judicial notice may be taken____” Halebian v. Berv, 644 F.3d 122, 131 (2d Cir. 2011) (internal quotation marks omitted). The materials AM submitted, and considered by the court, are none of these, and thus not part of the "pleadings” for purposes of Rule 12(d).
     
      
      . Our circuit has some confusing case law which, if read literally, would limit us to reviewing for abuse of discretion. See, e.g., New York v. Solvent Chem. Co., 664 F.3d 22, 25 (2d Cir.2011) ("We review a district court’s refusal to grant a declaratory judgment for abuse of discretion.”). Such statements, however, are somewhat overbroad. District courts unquestionably have discretion to decline to consider declaratory judgment actions. See Wilton v. Seven Falls Co., 515 U.S. 211, 282, 115 S.Ct. 2137, 132 L.Ed.2d 214 (1995) ("[Djistrict courts possess discretion in determining whether and when to entertain an action under the Declaratory Judgment Act, even when the suit otherwise satisfies subject matter jurisdictional prerequisites.”); see also 28 U.S.C. § 2201(a) ("[A]ny court of the United States ... may declare the rights and other legal relations of any interested party seeking such declaration....”) (emphasis added). Once the district court accepts jurisdiction, as this one did, legal determinations- — such as a party's entitlement to summary judgment — must be reviewed de novo. See N.Y. Times Co. v. Gonzales, 459 F.3d 160, 166 (2d Cir.2006) ("We review ... legal determination^ in] ... a declaratory judgment action de novo, and we review the decision to entertain such an action for abuse of discretion.”).
     
      
      . When the district court grants summary judgment sua sponte, no one actually moved for summary judgment, so the “non-moving party” is functionally just the one against whom summary judgment was granted.
     
      
      . Some Supreme Court decisions strongly suggest the narrow view of maritime contract jurisdiction. See, e.g., Exxon, 500 U.S. at 612, 111 S.Ct. 2071 (federal courts have "admiralty jurisdiction over contracts " (emphasis added)); The Belfast, 74 U.S. 624, 637, 7 Wall. 624, 19 L.Ed. 266 (1868) ("Principal subjects of admiralty jurisdiction are maritime contracts and maritime torts....”). Others, however, use broader language. See, e.g., Great Lakes Dredge & Dock Co. v. Kierejewski, 261 U.S. 479, 480, 43 S.Ct. 418, 67 L.Ed. 756 (1923) (discussing admiralty jurisdiction over "contract matters”); Grant Smith-Porter Ship Co. v. Rohde, 257 U.S. 469, 476, 42 S.Ct. 157, 66 L.Ed. 321 (1922) (same); see also DeLovio, 7 F.Cas. at 441-43 (discussing jurisdiction over "maritime contracts and concerns,” over "all maritime questions,” and over "all those causes, which originally and inherently belonged to the admiralty” (emphases added)). The likely reason for this ambiguity is that the distinction between a "maritime contract” and "an issue of maritime contract” is almost always academic. In a traditional, direct breach of contract action, the plaintiff will be the one asserting that a contract exists. It is only in a declaratory judgment case such as this one that the plaintiff, who must also propound subject-matter jurisdiction, will be simultaneously denying the existence of a contract and invoking our admiralty contract jurisdiction.
     
      
      . Congress, of course, can limit the subject-matter jurisdiction of the federal courts, within reason. See United States v. Denedo, 556 U.S. 904, 912, 129 S.Ct. 2213, 173 L.Ed.2d 1235 (2009) ("Assuming no constraints or limitations grounded in the Constitution are implicated, it is for Congress to determine the subject-matter jurisdiction of federal courts.”); cf. Battaglia v. Gen. Motors Corp., 169 F.2d 254, 257 (2d Cir.1948) (“[Wjhile Congress has the undoubted power to give, withhold, and restrict the jurisdiction of courts other than the Supreme Court, it must not so exercise that power as to deprive any person of life, liberty, or property without due process of law or to take private property without just compensation.” (footnote omitted)). But it cannot expand jurisdiction beyond what the Constitution allows.
     
      
      . This statement was dictum in Wycoff, but was adopted in the holding of Franchise Tax Board. See 463 U.S. at 16 n. 14, 103 S.Ct. 2841.
     
      
      . Some years ago, the Supreme Court, in dicta, seemed to call this realignment practice into question. In Textron Lycoming Reciprocating Engine Division, Avco Corp. v. United Automobile, Aerospace & Agricultural Implement Workers of America, International Union, 523 U.S. 653, 118 S.Ct. 1626, 140 L.Ed.2d 863 (1998), Justice Scalia wondered whether "the converse of Shelly Oil — i.e., a declaratory-judgment complaint raising a nonfederal defense to an anticipated federal claim — would confer [federal-question] jurisdiction” or whether the declaratory-judgment plaintiff must have its own federal claim, too. Textron Lycoming, 523 U.S. at 659, 118 S.Ct. 1626. Despite this observation, Justice Scalia was comfortable assuming, without deciding, that federal question jurisdiction would lie in such a declaratory judgment action. Id. at 660, 118 S.Ct. 1626. Concurring in the judgment, Justice Breyer argued jurisdiction would be proper, citing in particular the "prevalence in the lower courts of 'reverse' declaratory judgment actions that focus upon a party's likely defense.” Textron Lycoming, 523 U.S. at 664, 118 S.Ct. 1626 (Breyer, J., concurring). Despite this dictum in Textron Lycoming, federal courts have continued to analyze jurisdiction by reordering the parties’ positions, notwithstanding the absence of a federal cause of action in the declaratory judgment plaintiff’s complaint. See, e.g., ABB Inc. v. Cooper Indus., LLC, 635 F.3d 1345, 1350 (Fed.Cir.2011) (although the plaintiff’s declaratory-judgment action asserted only a state-law license claim, "the actual controversy in this case is over infringement” and jurisdiction was proper because "the declaratory defendant’s hypothetical coercive complaint here is a patent infringement suit”).
     
      
      . Several courts adjudicating maritime disputes have discussed Skelly Oil, but not as determinative of the admiralty jurisdictional question. Those courts which have touched on Skelly Oil have implied that the doctrine extends to admiralty. For example, in Lowe v. Ingalls Shipbuilding, a Division of Litton Systems, Inc., 723 F.2d 1173, 1179 (5th Cir. 1984), the Fifth Circuit acknowledged that the Skelly Oil doctrine might apply to admiralty, see id. at 1183, 1190, but held that the mirror-image case, in the court’s words, the "substantive issues which this suit seeks to resolve,” id. at 1183, was not governed by maritime law, id. at 1189. Similarly, in Three Buoys Houseboat Vacations U.S.A., Ltd. v. Morts, 878 F.2d 1096 (8th Cir.1989), vacated on other grounds, 497 U.S. 1020, 110 S.Ct. 3265, 111 L.Ed.2d 775 (1990), a defendant in a state-law wrongful death suit brought an action in federal court under the Limitation of Liability Act. Although the DJA was not implicated, the Eighth Circuit extended Skelly Oil to hold that federal-question jurisdiction was lacking, on the grounds that the Limitation of Liability Act is essentially a defense. Id. at 1100-01. Furthermore, while the court did not apply Skelly Oil to the question of admiralty jurisdiction because the underlying tort did not occur on navigable water, the Eight Circuit’s admiralty analysis in Three Buoys assumes that, if the underlying tort had implicated admiralty jurisdiction, the court would have had jurisdiction over the non-admiralty declaratory judgment action.
     
      
      . If a plaintiff invokes the saving to suitors clause to bring an admiralty action in a state court, the issues generally are resolved by applying the substantive rules of admiralty and maritime law, which, as mentioned above, are federal rules of decision. The application of federal law in saving to suitors cases is known as the "Reverse Erie” doctrine, pursuant to which state courts are required to apply federal maritime law even if a case is properly brought in state court. See e.g., Carlisle Packing Co. v. Sandanger, 259 U.S. 255, 259, 42 S.Ct. 475, 66 L.Ed. 927 (1922); see also Force, supra, at 19.
     
      
      . This conclusion is consistent with the result of the only district court decision from our circuit to have considered the matter. See Sikorsky Aircraft Corp. v. Lloyds TSB Gen. Leasing (No. 20) Ltd., 774 F.Supp.2d 431, 437 (D.Conn.2011). The district court’s analysis in Sikorsky simply applied Skelly Oil to admiralty (and diversity) jurisdiction without explicitly recognizing that Skelly Oil, by its terms, governs only federal-question jurisdiction. But, for the reasons stated here, its outcome was correct.
     
      
      . Most of the parties’ arguments are entirely beside the point. For example, AM’s first argument on appeal is that the Federal Maritime Lien Act allowed CMR to incur a lien on GFK's behalf. In seeking arbitration, however, AM was not seeking to enforce a lien, but rather to bind GFK to a contract. Because AM has not brought an action in rem, the Federal Maritime Lien Act’s presumption that “a person entrusted with the management of [a] vessel at the port of supply” has “authority to procure necessaries for a vessel” does not apply. 46 U.S.C. § 31341. Because AM brings this contract action against GFK in personam, traditional agency principles apply.
     
      
      . For example, in a breach of contract case where the defendant denies being a party to the contract, the plaintiff may prove that the defendant’s agent, acting within his authority, entered into the contract.
     
      
      . AM also submitted an official Mauritius "inventory report” identifying CMR as "manager” and GFK as "owner.” There is no evidence this document was prepared by GFK.
     
      
      . The district court, in contrast, appears to have emphasized how CMR represented its relationship with GFK.
     
      
      . In reality, because AM, not GFK, bears the burden of proving agency, GFK did not have to submit anything. Cf. Celotex Corp. v. Catrett, 477 U.S. 317, 324, 106 S.Ct. 2548, 91 L.Ed.2d 265 (1986) ("[W]here the nonmoving party will bear the burden of proof at trial on a dispositive issue, a summary judgment motion may properly be made in reliance solely on the pleadings, depositions, answers to interrogatories, and admissions on file." (quotation marks omitted)); id. at 325, 106 S.Ct. 2548 (it is "the burden of the moving party to show initially the absence of a genuine issue concerning any material fact.” (alteration and quotation marks omitted)).
     
      
      .Moreover, even if GFK's listing of CMR as its manager on the insurance certificates is enough to show that GFK held CMR out as its agent authorized to sign contracts, AM has no proof that it relied on that insurance contract to believe CMR was so authorized. Compare Dinaco, 346 F.3d at 69.
     
      
      . Indeed, some parts of the district court's oral ruling apparently find facts. See J.A. 137 ("[A]s a matter of agency, it’s more likely than not that CMR was functioning as the agent for GFK----") (emphasis added). AM argues that factfinding was fine, because the proceeding in the district court was actually an "evidentiary hearing.” But the district court itself specifically explained that it was not holding an evidentiary hearing. See J.A. 130 ("If I have a hearing, what would I hear beyond what you have already submitted?” (emphasis added)).
     