Mr. Justice Marshall
delivered the opinion of the Court.
Under the basic federal mining statute, which derives from an 1872 law, “all valuable mineral deposits in lands belonging to the United States” are declared “free and open to exploration and purchase.” 30 U. S. C. § 22. The question presented is whether water is a "valuable mineral” as those words are used in the mining law.
I
A claim to federal land containing “valuable mineral deposits” may be “located” by complying with certain procedural requisites; one who locates a claim thereby gains the exclusive right to possession of the land, as well as the right to extract minerals from it. See generally 30 U. S. C. §§ 21-54; 1 American Law of Mining § 1.17 (1973). The claim at issue in this case, known as Claim 22, is one of a group of 23 claims near Las Vegas, Nev., that were located in 1942. In 1962, after respondent had purchased these claims, it discovered water on Claim 22 by drilling a well thereon. This water was used to prepare for commercial sale the sand and gravel removed from some of the 23 claims.
In 1965, the Secretary of the Interior filed a complaint with the Bureau of Land Management, seeking to have all of these claims declared invalid on the ground that the only minerals discovered on them were “common varieties” of sand and gravel, which had been expressly excluded from the definition of “valuable minerals” by a 1955 statute. § 3, 69 Stat. 368, 30 U. S. C. § 611. At the administrative hearing on the Secretary’s complaint, the principal issue was whether the sand and gravel deposits were “valuable” prior to the effective date of the 1955 legislation, in which case the claims would be valid. The Administrative Law Judge concluded after hearing the evidence that respondent had established pre-1955 value only as to Claim 10. On appeals taken by both respondent and the Government, the Interior Board of Land Appeals (IBLA) affirmed the Administrative Law Judge in all respects here relevant. 9 I. B. L. A. 94 (1973) ,
Respondent sought review in the United States District Court for the District of Nevada. The court concluded that the decisions of the Administrative Law Judge and the IBLA were not supported by the evidence and that “at least” Claims 1 through 16 were valid. App. to Pet. for Cert. 26a. The court further held “that access to Claim No. 22 must be permitted so that the water produced from the well on that claim may be made available to the operations on the valid claims.” Ibid. The IBLA’s decision was accordingly vacated, and the case remanded to the Department of the Interior.
On the Government’s appeal, the United States Court of Appeals for the Ninth Circuit affirmed. 553 F. 2d 1209 (1977). It agreed with the District Court as to Claims 1 through 16 and also agreed that respondent was entitled to access to the water on Claim 22. It grounded the latter conclusion, however, “upon a rationale other than that relied upon by the District Court,” id., at 1215, a rationale that had not been briefed or argued in either the District Court or the Court of Appeals. Noting that “[s]ince early times, water has been regarded as a mineral,” ibid., the appellate court stated that it could not assume “that Congress was not aware of the necessary glove of water for the hand of mining and [that] Congress impliedly intended to reserve water from those minerals allowed to be located and recovered,” id., at 1216. Since the water at Claim 22 “has an intrinsic value in the desert area” and has additional value at the particular site “as a washing agent for . . . sand and gravel,” the court ruled that respondent’s “claim for the extraction of [Claim 22’s] water is valid.” Ibid.
The difference between the District Court’s and the Court of Appeals’ rationales for allowing access to Claim 22 is a significant one. The District Court held only that respondent is entitled to use the water on the claim; the Court of Appeals, by contrast, held that the claim itself is valid. If the claim is indeed valid, respondent is not merely entitled to access to the water thereon, but also has exclusive possessory rights to the land and may keep others from making any use of it. By complying with certain procedures, moreover, respondent could secure a “patent” from the Government conveying fee simple title to the land. See 30 U. S. C. §§ 29, 37; 1 American Law of Mining § 1.23 (1973). See generally Union Oil Co. v. Smith, 249 U. S. 337, 348-349 (1919). In view of the significance of the determination that a mining claim to federal land is valid, the Government sought review here of the Court of Appeals’ sua sponte holding regarding Claim 22’s validity. The single question presented in the petition is “[w]hether water is a locatable mineral under the mining law of 1872.” Pet. for Cert. 2.
We granted certiorari, 434 U. S. 964 (1977), and we now reverse.
II
We may assume for purposes of this decision that the Court of Appeals was correct in concluding that water is a “mineral,” in the broadest sense of that word, and that it is “valuable.” Both of these facts are necessary to a holding that a claimant has located a “valuable mineral deposit” under the 1872 law, 30 U. S. C. § 22, but they are hardly sufficient.
This Court long ago recognized that the word “mineral,” when used in an Act of Congress, cannot be given its broadest definition. In construing an Act granting certain public lands, except “mineral lands,” to a railroad, the Court wrote:
“The word 'mineral’ is used in so many senses, dependent upon the context, that the ordinary definitions of the dictionary throw but little light upon its signification in a given case. Thus the scientific division of all matter into the animal, vegetable or mineral kingdom would be absurd as applied to a grant of lands, since all lands belong to the mineral kingdom .... Equally subversive of the grant would be the definition of minerals found in the Century Dictionary: as 'any constituent of the earth’s crust’ . . . .” Northern Pacific R. Co. v. Soderberg, 188 U. S. 526, 530 (1903).
In the context of the 1872 mining law, similar conclusions must be drawn. As one court observed, if the term “mineral” in the statute were construed to encompass all substances that are conceivably mineral, “there would be justification for making mine locations on virtually every part of the earth’s surface,” since “a very high proportion of the substances of the earth are in that sense 'mineral.' ” Rummell v. Bailey, 7 Utah 2d 137, 140, 320 P. 2d 653, 655 (1958). See also Robert L. Beery, 25 I. B. L. A. 287, 294-296 (1976) (noting that "common dirt,” while literally a mineral, cannot be considered locatable under the mining law); Holman v. Utah, 41 L. D. 314, 315 (1912); 1 American Law of Mining, supra, § 2.4, p. 168.
The fact that water may be valuable or marketable similarly is not enough to support a mining claim’s validity based on the presence of water. Many substances present on the land may be of value, and indeed it seems likely that land itself — especially land located just 15 miles from downtown Las Vegas, see 553 F. 2d, at 1211— has, in the Court of Appeals’ words, “an intrinsic value,” id., at 1216. Yet the federal mining law surely was not intended to be a general real estate law; as one commentator has written, “the Congressional mandate did not sanction the disposal of federal lands under the mining laws for purposes unrelated to mining.” 1 American Law of Mining, supra, § 1.18, p. 56; cf. Holman v. Utah, supra (distinguishing mining law from homestead and other agricultural entry laws). In order for a claim to be valid, the substance discovered must not only be a “valuable mineral” within the dictionary definition of those words, but must also be the type of valuable mineral that the 1872 Congress intended to make the basis of a valid claim.
Ill
The 1872 law incorporates two provisions involving water rights that derive from earlier mining Acts. See 17 Stat. 94-95. In 1866, in Congress’ first major effort to regulate mining on federal lands, it provided for the protection of the “vested rights” of “possessors and owners” “to the use of water for mining, agricultural, manufacturing or other purposes,” to the extent that these rights derive from “priority of possession” and “are recognized and acknowledged by the local customs, laws, and the decisions of courts.” 30 U. S. C. § 51. In 1870, Congress again emphasized its view that water rights derive from “local” law, not federal law, making “[a]ll patents granted . . . subject to any vested and accrued water rights ... as may have been acquired under or recognized by [the 1866 provision].” 30 U. S. C. § 52.
In discussing these mining law provisions on the subject of water rights, this Court has often taken note of the history of mining in the arid Western States. In 1879 Mr. Justice Field of California, writing for the Court, described in vivid terms the influx of miners that had shaped the water rights law of his State and its neighbors:
“The lands in which the precious metals were found belonged to the United States, and were unsurveyed Into these mountains the emigrants in vast numbers penetrated, occupying the ravines, gulches and canons, and probing the earth in all directions for the precious metals. . . . But the mines could not be worked without water. Without water the gold would remain for ever buried in the earth or rock. . . . The doctrines of the common law respecting the rights of riparian owners were not considered as applicable ... to the condition of miners in the mountains. . . . Numerous regulations were adopted, or assumed to exist, from their obvious justness, for the security of . . . ditches and flumes, and the protection of rights to water . . . .” Jennison v. Kirk, 98 U. S. 453, 457-458 (1879).
See also Basey v. Gallagher, 20 Wall. 670, 681-684 (1875) (Field, J.); Atchison v. Peterson, 20 Wall. 507, 510-515 (1874) (Field, J.). Over a half century later, Mr. Justice Sutherland set out this same history in California Oregon Power Co. v. Beaver Portland Cement Co., 295 U. S. 142, 154-155 (1935). He then explained that the water rights provisions of the 1866 and 1870 laws were intended to
“approve and confirm the policy of appropriation for a beneficial use, as recognized by local rules and customs, and the legislation and judicial decisions of the arid-land states, as the test and measure of private rights in and to the non-navigable waters on the public domain.” Id., at 155.
Our opinions thus recognize that, although mining law and water law developed together in the West prior to 1866, with respect to federal lands Congress chose to subject only mining to comprehensive federal regulation. When it passed the 1866 and 1870 mining laws, Congress clearly intended to preserve “pre-existing [water] right[s]." Broder v. Natoma Water & Mining Co., 101 U. S. 274, 276 (1879). Less than 15 years after passage of the 1872 law, the Secretary of the Interior in two decisions ruled that water is not a locatable mineral under the law and that private water rights on federal lands are instead “governed by local customs and laws,” pursuant to the 1866 and 1870 provisions. Charles Lennig, 5 L. D. 190, 191 (1886); see William A. Chessman, 2 L. D. 774, 775 (1883). The Interior Department, which is charged with principal responsibility for “regulating the acquisition of rights in the public lands,” Cameron v. United States, 252 U. S. 450, 460 (1920), has recently reaffirmed this interpretation. Robert L. Beery, 25 I. B. L. A. 287 (1976).
In ruling to the contrary, the Court of Appeals did not refer to 30 U. S. C. §§ 51 and 52, which embody the 1866 and 1870 provisions; to our opinions construing these provisions; or to the consistent course of administrative rulings on this question. Instead, without benefit of briefing, the court below decided that “it would be incongruous ... to hazard that Congress was not aware of the necessary glove of water for the hand of mining.” 553 F. 2d, at 1216. Congress was indeed aware of this, so much aware that it expressly provided a water rights policy in the mining laws. But the policy adopted is a “passive” one, 2 Waters and Water Rights § 102.1, p. 53 (R. Clark ed. 1967); Congress three times (in 1866, 1870, and 1872) affirmed the view that private water rights on federal lands were to be governed by state and local law and custom. It defies common sense to assume that Congress, when it adopted this policy, meant at the same time to establish a parallel federal system for acquiring private water rights, and that it did so sub silentio through laws designed to regulate mining. In light of the 1866 and 1870 provisions, the history out of which they arose, and the decisions construing them in the context of the 1872 law, the notion that water is a “valuable mineral” under that law is simply untenable.
IV
The conclusion that Congress did not intend water to be locatable under the federal mining law is reinforced by consideration of the practical consequences that could be expected to flow from a holding to the contrary.
A
Many problems would undoubtedly arise simply from the fact of having two overlapping systems for acquisition of private water rights. Under the appropriation doctrine prevailing in most of the Western States, the mere fact that a person controls land adjacent to a body of water means relatively little; instead, water rights belong to “[t]he first appropriator of water for a beneficial use,” but only “to the extent of his actual use,” California Oregon Power Co. v. Beaver Portland Cement Co., supra, at 154; see Jennison v. Kirk, supra, at 458; W. Hutchins, Selected Problems in the Law of Water Rights in the West 30-32, 389-403 (1942); McGowen, The Development of Political Institutions on the Public Domain, 11 Wyo. L. J. 1, 14 (1957). Failure to use the water to which one is entitled for a certain period of time generally causes one’s rights in that water to be deemed abandoned. See generally 2 W. Hutchins, Water Rights Laws in the Nineteen Western States 256-328 (1974).
With regard to minerals located under federal law, an entirely different theory prevails. The holder of a federal mining claim, by investing $100 annually in the claim, becomes entitled to possession of the land and may make any use, or no use, of the minerals involved. See 30 U. S. C. § 28. Once fee title by patent is obtained, see supra, at 609, even the $100 requirement is eliminated.
One can readily imagine the legal conflicts that might arise from these differing approaches if ordinary water were treated as a federally cognizable '“mineral.” A federal claimant could, for example, utilize all of the water extracted from a well like respondent’s, without regard for the settled prior appropriation rights of another user of the same water. Or he might not use the water at all and yet prevent another from using it, thereby defeating the necessary Western policy in favor of “actual use” of scarce water resources. California Oregon Power Co. v. Beaver Portland Cement Co., 295 U. S., at 154. As one respected commentator has written, allowing water to be the basis of a valid mining claim “could revive long abandoned common law rules of ground water ownership and capture, and . . . could raise horrendous problems of priority and extralateral rights.” We decline to effect so major an alteration in established legal relationships based on nothing more than an overly literal reading of a statute, without any regard for its context or history.
B
A final indication that water should not be held to be a locatable mineral derives from Congress’ 1955 decision to remove “common varieties” of certain minerals from the coverage of the mining law. 30 U. S. C. § 611; see supra, at 606-607, and n. 5. This decision was made in large part because of “abuses under the general mining laws by . . . persons who locate[d] mining claims on public lands for purposes other than that of legitimate mining activity.” H. R. Rep. No. 730, 84th Cong., 1st Sess., 5 (1955); see S. Rep. No. 554, 84th Cong., 1st Sess., 4-5 (1955). Apparently, locating a claim and obtaining a patent to federal land were so inexpensive that many “use[d] the guise of mining locations for nonmining purposes,” including the establishment of “filling stations, curio shops, cafes, . . . residencefs] [and] summer camp[s].” H. R. Rep. No. 730, p. 6; see S. Rep. No. 554, p. 5.
Water, of course, is among the most common of the earth’s elements. While it may not be as common in the federal lands subject to the mining law as it is elsewhere, it is nevertheless common enough to raise the possibility of abuse by those less interested in extracting mineral resources than in obtaining title to valuable land. See Robert L. Beery, 25 I. B. L. A., at 296-297. Given the unprecedented nature of the Court of Appeals’ decision, it is hardly surprising that the 1955 Congress did not include water on its list of “common varieties” of minerals that cannot confer validity on a mining claim. But the concerns that Congress addressed in the 1955 legislation indicate that water, like the listed minerals, should not be considered a locatable mineral under the 1872 mining law.
V
It has long been established that, when grants to federal land are at issue, any doubts “are resolved for the Government, not against it.” United States v. Union Pacific R. Co., 353 U. S. 112, 116 (1957). A fortiori, the Government must prevail in a case such as this, when the relevant statutory provisions, their historical context, consistent administrative and judicial decisions, and the practical problems with a contrary holding all weigh in its favor. Accordingly, the judgment of the Court of Appeals is
Reversed.
Act of May 10, 1872, 17 Stat. 91.
Title 30 U. S. C. § 22 provides in full:
“Except as otherwise provided, all valuable mineral deposits in lands belonging to the United States, both surveyed and unsurveyed, shall be free and open to exploration and purchase, and the lands in which they are found to occupation and purchase, by citizens of the United States and those who have declared their intention to become such, under regulations prescribed by law, and according to the local customs or rules of miners in the several mining districts, so far as the same are applicable and not inconsistent with the laws of the United States.”
Title 30 U. S. C. § 611 provides in pertinent part:
“No deposit of common varieties of sand, stone, gravel, pumice, pumicite, or cinders and no deposit of petrified wood shall be deemed a valuable mineral deposit within the meaning of the mining laws of the United States so as to give effective validity to any mining claim hereafter located under such mining laws: Provided, however, That nothing herein shall affect the validity of any mining location based upon discovery of some other mineral occurring in or in association with such a deposit. 'Common varieties’ as used in sections 601, 603, and 611 to 615 of this title does not include deposits of such materials which are valuable because the deposit has some property giving it distinct and special value . . .
The question of value has traditionally been resolved by application of “complement[ary]” tests relating to whether “‘a person of ordinary prudence’ ” would have expended “ 'his labor and means’ ” developing the claim at issue and whether the minerals thereon could have been “ ‘extracted, removed and marketed at a profit.’ ” United States v. Coleman, 390 U. S. 599, 600, 602 (1968), quoting decisions of the Secretary of the Interior in Coleman and in Castle v. Womble, 19 L. D. 455, 457 (1894).
The Administrative Law Judge, in addition to holding that Claim 10 was valid based on its pre-1955 value, held that Claim 9 was valid because it provided reserve material for Claim 10. The IBLA reversed as to Claim 9, holding it invalid. 9 I. B. L. A., at 108.
The Secretary’s complaint also named two other claims, numbered 12A and 13A, that were located by respondent in 1961. Since location occurred after the relevant 1955 date, the Administrative Law Judge held these claims invalid. His decision regarding Claims 12A and 13A was upheld by both the IBLA, 9 I. B. L. A., at 106, and the District Court, App. to Pet. for Cert. 25a, and was not contested in the Court of Appeals, see 553 F. 2d 1209, 1210 n. 1 (CA9 1977).
Although the question of the District Court’s subject-matter jurisdiction was not raised in this Court or apparently in either court below, we have an obligation to consider the question sua sponte. See, e. g., Mt. Healthy City School Dist. Bd. of Educ. v. Doyle, 429 U. S. 274, 278 (1977); Mansfield, Coldwater, & Lake Michigan R. Co. v. Swan, 111 U. S. 379, 382 (1884). Respondent’s complaint alleged jurisdiction based on the Administrative Procedure Act (APA), 5 U. S. C. § 701 et seq., and 28 U. S. C. §§ 1361, 1391 (e). App. 27A. Title 28 U. S. C. § 1391 (e) is a venue statute and cannot itself confer jurisdiction.
With regard to the APA, while it may have appeared to be a proper basis of jurisdiction in the Ninth Circuit at the time the complaint was filed in 1973, see Brandt v. Hickel, 427 F. 2d 63, 55 (CA9 1970), we have since held that “the APA does not afford an implied grant of subject-matter jurisdiction permitting federal judicial review of agency action,” Califano v. Sanders, 430 U. S. 99, 107 (1977). We need not decide whether jurisdiction would lie here under 28 U. S. C. § 1361, because jurisdiction in this action to review a decision of the Secretary of the Interior is clearly conferred by 28 U. S. C. § 1331 (a).
This general federal-question statute was amended in 1976 to eliminate the amount-in-controversy requirement with regard to actions “brought against the United States, any agency thereof, or any officer or employee thereof in his official capacity.” Pub. L. No. 94-574 § 2, 90 Stat. 2721. Hence the fact that in 1973 respondent in its complaint did not allege $10,000 in controversy is now of no moment. See Ralpho v. Bell, 186 U. S. App. D. C. 368, 376-377, n. 51, 569 F. 2d 607, 615-616, n. 51 (1977); Green v. Philbrook, 427 F. Supp. 834, 836 (Vt. 1977). Nor does it matter that the complaint does not in so many words assert § 1331 (a) as a basis of jurisdiction, since the facts alleged in it are sufficient to establish such jurisdiction and the complaint appeared jurisdictionally correct when filed. See Fort Sumter Tours, Inc. v. Andrus, 564 F. 2d 1119, 1123 n. 4 (CA4 1977); Harary v. Blumenthal, 555 F. 2d 1113, 1115 n. 1 (CA2 1977); Fitzgerald v. United States Civil Service Comm’n, 180 U. S. App. D. C. 327, 329 n. 1, 554 F. 2d 1186, 1188 n. 1 (1977).
In reaching this conclusion, the court correctly noted, 563 F. 2d, at 1216, that water is not listed among the “common varieties” of minerals withdrawn from location by 30 U. S. C. § 611. Hence the fact that respondent did not discover water on Claim 22 until after 1955 is irrelevant to the question of the validity of the claim. See supra, at 606-607, andn. 3. See also infra, at 617.
By referring to the intent of the 1872 Congress, we do not mean to imply that the only minerals locatable are those that were known to exist in 1872. But Congress’ general conception of what a “valuable mineral” was for purposes of mining claim location is of obvious relevance in construing the 1872 law.
Title 30 U. S. C. § 51 provides in full:
“Whenever, by priority of possession, rights to the use of water for mining, agricultural, manufacturing, or other purposes have vested and accrued, and the same are recognized and acknowledged by the local customs, laws, and the decisions of courts, the possessors and owners of such vested rights shall be maintained and protected in the same; and the right-of-way for the construction of ditches and canals for the purposes herein specified is acknowledged and confirmed; but .whenever any person, in the construction of any ditch or canal, injures or damages the possession of any settler on the public domain, the party committing such injury or damage shall be liable to the party injured for such injury or damage.”
Title 30 U. S. C. § 52 provides in full:
“All patents granted, or homesteads allowed, shall be subject to any vested and accrued water rights, or rights to ditches and reservoirs used in connection with such water rights, as may have been acquired under or recognized by section 51 of this title.”
The holder of a valid mining claim is generally understood to have an unlimited right to extract minerals from the claim, “even to exhaustion.” Union Oil Co. v. Smith, 249 U. S. 337, 349 (1919). Respondent suggests that this right could be limited in the context of a mining-law claim to water, if the law were construed to require the claimant to respect water rights previously vested under state law. Brief for Respondent 31 n. 8; see id., at 25-26.
Trelease, Federal-State Problems in Packaging Water Rights, in Water Acquisition for Mineral Development Institute Paper 9, pp. 9-17 n. 47 (Rocky Mt. Min. L. Fdn., 1978).
The Court of Appeals’ suggestion that a claim to water might be validated simply because of the “intrinsic value” of water “in the desert area,” 553 F. 2d, at 1216, makes abuse particularly likely, since the “intrinsic value” theory would substantially lessen a claimant’s burden of showing the “valuable” nature of his claim. See n. 4, supra.