Where public lands of the United States have been withdrawn for possible use for construction purposes under the Federal reclamation laws, and are known or believed to be valuable for minerals and would, if not so withdrawn, be subject to location and patent under the general mining laws, the Secretary of the Interior, when in his opinion the rights of the United States will not be prejudiced thereby, may, in his discretion, open the land to location, entry, and patent under the general mining laws, reserving such ways, rights, and easements over or to such lands as may be prescribed by him and as may be deemed necessary or appropriate, including the right to take and remove from such lands construction materials for use in the construction of irrigation works, and/or the said Secretary may require the execution of a contract by the intending locator or entryman as a condition precedent to the vesting of any rights in him, when in the opinion of the Secretary same may be necessary for the protection of the irrigation interests. Such reservations or contract rights may be in favor of the United States or irrigation concerns cooperating or contracting with the United States and operating in the vicinity of such lands. The Secretary may prescribe the form of such contract which shall be executed and acknowledged and recorded in the county records and United States local land office by any locator or entryman of such land before any rights in their favor attach thereto, and the locator or entryman executing such contract shall undertake such indemnifying covenants and shall grant such rights over such lands as in the opinion of the Secretary may be necessary for the protection of Federal or private irrigation in the vicinity. Notice of such reservation or of the necessity of executing such prescribed contract shall be filed in the Bureau of Land Management and in the appropriate local land office, and notations thereof shall be made upon the appropriate tract books, and any location or entry thereafter made upon or for such lands, and any patent therefor shall be subject to the terms of such contract and/or to such reserved ways, rights, or easements and such entry or patent shall contain a reference thereto.
The Secretary of the Interior may prescribe such rules and regulations as may be necessary to enable him to enforce the provisions of this section.