                 FOR PUBLICATION

  UNITED STATES COURT OF APPEALS
       FOR THE NINTH CIRCUIT

STATE OF ALASKA DEPARTMENT OF             No. 14-35051
NATURAL RESOURCES; DEPARTMENT
OF TRANSPORTATION AND PUBLIC                 D.C. No.
FACILITIES,                               4:13-cv-00008-
             Plaintiffs-Appellants,            RRB

                  v.
                                            OPINION
UNITED STATES OF AMERICA; AGNES
M. PURDY, Owner of Native
Allotment No. 50-2008-0437
certificate no.; that portion of Native
Allotment No. 50-2008-0437
currently occupied by Chicken Ridge
Alternate, Myers Fork Spur, Chicken
to Franklin and Chicken Ridge
Trails, containing 17.5 acres;
BARBARA A. REDMON, on behalf of
Anne L. Purdy, Owner of Native
Allotment No. 50-2013-0004,
certificate no.; that portion of Native
Allotment No. 50-2013-0004
currently occupied by Chicken to
Franklin and Chicken Ridge Trails,
containing approximately 6.4 acres
of land; DENA’ NENA’ HENASH,
Tanana Chiefs Conference, an
Alaska non-profit corporation,
                 Defendants-Appellees.
2      STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES

        Appeal from the United States District Court
                 for the District of Alaska
     Ralph R. Beistline, Senior District Judge, Presiding

                   Argued and Submitted
              May 12, 2015—Anchorage, Alaska

                       Filed March 14, 2016

         Before: William C. Canby, Jr., Jay S. Bybee,
             and Paul J. Watford, Circuit Judges.

                    Opinion by Judge Watford


                           SUMMARY*


    Quiet Title / Declaratory Judgment / Condemnation

     The panel affirmed the district court’s dismissal of quiet
title and declaratory judgment claims for lack of subject
matter jurisdiction, and vacated the dismissal of a
condemnation claim in a case involving a land dispute
between the State of Alaska and two Alaska Natives, Agnes
and Anne Purdy, concerning ownership of rights-of-way for
four public trails that cross the Purdys’ land.

    The Purdys acquired ownership of the parcels in question
under the Alaska Native Allotment Act through allotments by
the federal government. The State of Alaska contended that

  *
    This summary constitutes no part of the opinion of the court. It has
been prepared by court staff for the convenience of the reader.
      STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES     3

the allotments were subject to rights-of-way for four trails.
Federal statute R.S. 2477, repealed in 1976, granted rights of
way over public lands; it was self-executing; acceptance of a
grant was determined by state law; and under Alaska law an
R.S. 2477 grant could be accepted through public use.

    Addressing the State of Alaska’s Quiet Title Act claim,
the panel held that the State of Alaska’s quiet title claim was
barred. The panel held that the United States was a necessary
party to the claim because it held an interest in the Purdys’
allotments (by virtue of the restraint on alienation), and
recognition of the R.S. 2477 rights-of-way would impair the
United States’ interest. The panel further held that the
United States had not waived its immunity from suit pursuant
to the Quiet Title Act’s Indian lands exception, which
preserves the United States’ immunity from suit when the
United States claims an interest based on that property’s
status as trust or restricted Indian lands. The panel concluded
that the district court properly dismissed the claim for lack of
subject matter jurisdiction.

    The panel held that the district court correctly dismissed
the State of Alaska’s claim for declaratory relief under 28
U.S.C. § 2201, which sought essentially the same relief as the
quiet title claim.

    Addressing the State of Alaska’s condemnation claim
against the Purdys and the United States under 25 U.S.C.
§ 357, the panel held that although the district court had
subject matter jurisdiction to hear the State’s condemnation
claim, the claim could not proceed as pleaded. The panel
held that the United States was an indispensable party to the
claim. The panel further held that the district court erred in
dismissing the claim on the ground that the United States had
4     STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES

not waived its sovereign immunity because Congress waived
the government’s immunity with respect to such claims. The
panel also held that the United States’ express consent to the
condemnation claim was not required. The panel concluded
that the State improperly pleaded its condemnation claim, and
remanded so that the State may be given an opportunity to
amend the claim if it so chooses.


                         COUNSEL

Michael C. Geraghty, Attorney General, David A. Wilkinson
(argued), Assistant Attorney General, Mary Ann Lundquist,
Senior Assistant Attorney General, Fairbanks, Alaska, for
Plaintiffs-Appellants State of Alaska Department of Natural
Resources and Department of Transportation and Public
Facilities.

Sam Hirsch, Acting Assistant Attorney General, David C.
Shilton and John Emad Arbab (argued), Attorneys,
Environment & Natural Resources Division, United States
Department of Justice, Washington, D.C., for Defendant-
Appellee United States of America.

Michael C. Kramer (argued) and Justin J. Andrews, Kramer
and Associates, Fairbanks, Alaska, for Defendants-Appellees
Agnes Purdy and Anne Purdy.

Richard D. Monkman, Harry R. Sachse, and Maile S.
Tavepholjalern, Sonosky, Chambers, Sachse, Miller &
Munson, LLP, for Defendant-Appellee Dena’ Nena’ Henash
(Tanana Chiefs Conference).
      STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES     5

                          OPINION

WATFORD, Circuit Judge:

    This case involves a land dispute between the State of
Alaska and two Alaska Natives, Agnes and Anne Purdy.
Agnes Purdy owns a 160-acre parcel of land in eastern Alaska
near the town of Chicken; her sister Anne owns a neighboring
40-acre parcel. The State contends that it owns rights-of-way
for four public trails that cross the Purdys’ land, trails which
the State wants to keep open for public use. The Purdys
dispute the State’s claim of ownership and want to stop
members of the public from trespassing on their property by
using the trails.

     The State sued the Purdys and the United States (as well
as other defendants not relevant here) in federal court. Three
of the State’s claims are at issue: (1) a claim seeking to quiet
title to the four rights-of-way; (2) a declaratory judgment
claim seeking essentially the same relief; and (3) a claim
seeking to condemn for public use whatever portions of the
rights-of-way the State does not already own. The district
court dismissed these claims for lack of subject matter
jurisdiction and entered partial final judgment under Federal
Rule of Civil Procedure 54(b). The remainder of the action
has been stayed pending resolution of this appeal.

    We conclude that the district court properly dismissed the
quiet title and declaratory judgment claims for lack of subject
matter jurisdiction. We vacate dismissal of the condemnation
claim because that claim may proceed if the State chooses to
amend it on remand.
6     STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES

                               I

    The Purdys acquired ownership of the parcels in question
under the Alaska Native Allotment Act, 43 U.S.C. § 270–1 et
seq. (1970). Congress repealed the Act in 1971 but included
a savings provision for applications pending on the repeal
date. 43 U.S.C. § 1617(a). As relevant here, the Act
authorized the Secretary of the Interior to allot up to 160
acres of land to Alaska Natives, subject to a restraint on
alienation. The relevant portion of the statute provides:

       The Secretary of the Interior is authorized and
       empowered, in his discretion and under such
       rules as he may prescribe, to allot not to
       exceed one hundred and sixty acres of vacant,
       unappropriated, and unreserved nonmineral
       land in Alaska . . . to any Indian, Aleut, or
       Eskimo of full or mixed blood who resides in
       and is a native of Alaska, and who is the head
       of a family, or is twenty-one years of age; and
       the land so allotted shall be deemed the
       homestead of the allottee and his heirs in
       perpetuity, and shall be inalienable and
       nontaxable until otherwise provided by
       Congress . . . .

§ 270–1. To qualify for an allotment, an applicant needed to
show “substantially continuous use and occupancy of the land
for a period of five years.” § 270–3.

   The Purdys applied for their respective allotments in 1971
before the Act was repealed. After a decades-long
administrative process, the Bureau of Land Management
(BLM) approved the Purdys’ allotment applications,
      STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES       7

concluding that Agnes had shown continuous use and
occupancy of her 160-acre parcel since 1931, and that Anne
had shown continuous use and occupancy of her 40-acre
parcel since 1955. In 2008 and 2012, the BLM issued
allotment certificates to the Purdys that transferred title to the
land. As mandated by the Act, the allotment certificates
contain a restraint on alienation stating that the land “shall be
inalienable and nontaxable until otherwise provided by
Congress or until the Secretary of the Interior . . . approves a
deed of conveyance vesting in the purchaser a complete title
to the land.”

    The State contends that the Purdys’ allotments are subject
to rights-of-way for the following trails: the Chicken to
Franklin Trail, the Chicken Ridge Trail, the Chicken Ridge
Alternative Trail, and the Myers Fork Spur Trail. The State’s
complaint alleges that the public began using these trails in
the late 1800s, long before the Purdys’ use and occupancy of
their allotments began. The State further alleges that, by
virtue of this public use, it acquired ownership of the rights-
of-way under an unusual federal statute known as R.S. 2477.
That statute, first enacted in 1866, provides: “The right of
way for the construction of highways over public lands, not
reserved for public uses, is granted.” 43 U.S.C. § 932 (1970).
Congress repealed the statute in 1976, but rights-of-way in
existence on the date of repeal were preserved. Lyon v. Gila
River Indian Community, 626 F.3d 1059, 1076 (9th Cir.
2010).

     R.S. 2477 is unusual, as land-grant statutes go, because of
its self-executing nature. No formal document memorializing
the grant of a right-of-way needed to be executed by a federal
official. Southern Utah Wilderness Alliance v. BLM,
425 F.3d 735, 741 (10th Cir. 2005). Nor did a State, as the
8     STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES

recipient of the grant, need to take any formal steps to accept
the federal government’s grant of a right-of-way. Acceptance
of a grant is determined by state law, and under Alaska law
an R.S. 2477 grant could be accepted through public use.
Fitzgerald v. Puddicombe, 918 P.2d 1017, 1019 (Alaska
1996); Hamerly v. Denton, 359 P.2d 121, 123 (Alaska 1961).
“The extent of public use necessary to establish acceptance of
the RS 2477 grant depends upon the character of the land and
the nature of the use.” Fitzgerald, 918 P.2d at 1020. While
“infrequent and sporadic” use is insufficient, Hamerly,
359 P.2d at 125, “continuous use is not required,” Fitzgerald,
918 P.2d at 1020. Beyond that, the Alaska cases provide little
guidance as to the quantum of public use that must be shown,
other than to note that the ultimate question is whether there
has been public use “for such a period of time and under such
conditions as to prove that the grant has been accepted.”
Hamerly, 359 P.2d at 123.

     The State’s complaint alleges facts that, in its view,
establish sufficient public use of the four trails to prove
acceptance of the grant. For example, the State alleges that
in 1926, some 517 people, 215 pack horses, 29 sleds, and 75
tons of freight traversed the Chicken to Franklin Trail, while
261 people, 86 pack horses, and 5 tons of freight traversed the
Chicken Ridge Trail. Whether the public’s use of the four
trails was sufficient to prove acceptance under Alaska law is
an issue that has not previously been resolved through
litigation. The State seeks to litigate that issue now. And it
seeks more particularly to show that, because the rights-of-
way were accepted before the Purdys’ use and occupancy of
their allotments began, the Purdys took title subject to the
State’s pre-existing ownership interests.
      STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES       9

                                II

    The first question raised by this appeal is whether the
district court had jurisdiction to hear the State’s quiet title
claim, by which it seeks to establish ownership of the four
contested rights-of-way. The second question is whether the
State may condemn for public use whatever portions of the
rights-of-way it does not already own.

                                A

    The district court correctly held that the State’s quiet title
claim is barred. The United States is a necessary party to that
claim but has not waived its immunity from suit.

   To establish ownership of the rights-of-way, the State
sued the United States under the Quiet Title Act (QTA),
28 U.S.C. § 2409a. The QTA states in relevant part:

        The United States may be named as a party
        defendant in a civil action under this section
        to adjudicate a disputed title to real property
        in which the United States claims an interest,
        other than a security interest or water rights.
        This section does not apply to trust or
        restricted Indian lands . . . .

§ 2409a(a). The State had to name the United States as a
defendant because it holds an interest in the Purdys’
allotments (by virtue of the restraint on alienation), and
recognition of the R.S. 2477 rights-of-way would impair the
United States’ interest. See Minnesota v. United States,
305 U.S. 382, 386 n.1 (1939); United States v. City of
McAlester, 604 F.2d 42, 46 (10th Cir. 1979). The State had
10    STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES

to sue under the QTA because that statute provides “the
exclusive means by which adverse claimants [may] challenge
the United States’ title to real property.” Block v. North
Dakota, 461 U.S. 273, 286 (1983). The QTA governs even
when an adverse claimant, like the State here, asserts
ownership of less than a fee simple interest. Mills v. United
States, 742 F.3d 400, 405 (9th Cir. 2014); State of Alaska v.
Babbitt (Albert), 38 F.3d 1068, 1074 (9th Cir. 1994).

    The United States may be sued only if a statute expressly
waives its sovereign immunity. Block, 461 U.S. at 280. The
QTA waives the United States’ immunity with respect to
claims covered by that statute, but the statute excludes from
its coverage claims involving “trust or restricted Indian
lands.” 28 U.S.C. § 2409a(a). This exclusion, known as the
Indian lands exception, preserves the United States’ immunity
from suit “when the United States claims an interest in real
property based on that property’s status as trust or restricted
Indian lands.” United States v. Mottaz, 476 U.S. 834, 843
(1986).

    The Indian lands exception applies if the federal
government has a “colorable claim” that the lands in question
are trust or restricted Indian lands. Wildman v. United States,
827 F.2d 1306, 1309 (9th Cir. 1987). That test is met so long
as the federal government’s position “was not undertaken in
either an arbitrary or frivolous manner.” Albert, 38 F.3d at
1076.

    The federal government has a colorable claim that the
Purdys’ allotments are restricted Indian lands. The allotments
are Indian lands because the Purdys received the allotments
under the Alaska Native Allotment Act. See State of Alaska
v. Babbitt (Foster), 75 F.3d 449, 450–52 (9th Cir. 1996). And
      STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES    11

those lands are considered “restricted” by virtue of the
restraint on alienation contained in the allotment certificates.
See 25 C.F.R. § 152.1(c); State of Alaska, 45 IBLA 318,
321–22 (1980). Thus, the allotment certificates alone give
rise to a colorable claim that the lands in question are
restricted Indian lands, see Foster, 75 F.3d at 452, unless the
State can show that the rights-of-way it asserts were validly
granted before the allotments were issued.

    The State successfully made that showing in State of
Alaska v. Babbitt (Bryant), 182 F.3d 672 (9th Cir. 1999). As
in this case, the land at issue in Bryant was allotted to an
Alaska Native (William Bryant), whose use and occupancy of
the land began in 1964. In 1961, however, the federal
government had earlier appropriated the same land to the
State for use as a material site right-of-way under a federal
highway statute. Id. at 673, 677 n.32. There was no dispute
that the 1961 grant to the State had in fact been made: The
statute authorizing the grant required then, as it does now,
that the Secretary of Transportation file “a map showing the
portion of such lands or interests in lands” that the federal
government wished to appropriate. 23 U.S.C. § 317(a). As
a legal matter, then, the land was simply not available for
allotment when Bryant began occupying it in 1964, and the
BLM therefore lacked the authority to allot the land to Bryant
in the first place. Given those facts, we held that the federal
government had no claim, much less a colorable one, that the
lands in question were trust or restricted Indian lands.
Bryant, 182 F.3d at 676–77.

    Our case is different. We do not have a clear and
undisputed grant from the federal government to the State of
an interest in the Purdys’ allotments. To be sure, we have a
potential grant of such an interest under R.S. 2477, but
12    STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES

whether the rights-of-way were accepted (and when) is open
to dispute. Resolution of that issue would require a fact-
intensive inquiry into the nature and character of the public’s
use of the four contested trails from the late 1800s through
the 1920s. The State may be right that it has the better of the
argument—that if given the chance to do so, it could
successfully show public use of the trails “for such a period
of time and under such conditions as to prove that the grant
has been accepted.” Hamerly, 359 P.2d at 123. But even
accepting as true all of the State’s factual allegations
concerning the nature and character of public use that
occurred, the question remains whether that use establishes,
as a legal matter, acceptance of the grants under Alaska law.
We cannot say that the issue is so open and shut that arguing
against recognition of the R.S. 2477 rights-of-way amounts
to an arbitrary or frivolous position. The federal government
therefore has a colorable claim that the lands in question are
restricted Indian lands.

    Because the Indian lands exception applies, the district
court correctly dismissed the State’s quiet title claim for lack
of subject matter jurisdiction. (We decline to address the
State’s argument that its quiet title claim against the Purdys
may proceed in the United States’ absence, as the State failed
to assert that argument below in opposition to the Purdys’
motion to dismiss.) The district court also correctly
dismissed the State’s claim for declaratory relief under
28 U.S.C. § 2201, which sought essentially the same relief as
the quiet title claim. A claim under the Declaratory Judgment
Act may not be used as an end run around the QTA’s limited
waiver of sovereign immunity. McMaster v. United States,
731 F.3d 881, 900 (9th Cir. 2013).
      STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES     13

                               B

    The State has also asserted a condemnation claim against
the Purdys and the United States under 25 U.S.C. § 357. That
statute provides: “Lands allotted in severalty to Indians may
be condemned for any public purpose under the laws of the
State or Territory where located in the same manner as land
owned in fee may be condemned, and the money awarded as
damages shall be paid to the allottee.” The United States is
an indispensable party to this claim, given the interest it holds
in the Purdys’ allotments. See Minnesota, 305 U.S. at 386.
The State adequately named the United States as a defendant
to the condemnation claim when it incorporated by reference
the parties named in paragraphs 15–21 of the complaint,
which included the United States.

    The district court dismissed the State’s condemnation
claim on the ground that the United States had not waived its
sovereign immunity. That ruling was in error. By
authorizing condemnation actions under § 357, Congress
waived the United States’ immunity with respect to such
claims. See Minnesota, 305 U.S. at 388; Jachetta v. United
States, 653 F.3d 898, 907 (9th Cir. 2011).

    The Purdys contend that the State may not pursue
a condemnation claim—even though authorized under
§ 357—unless the United States expressly consents to the
suit. That contention is squarely foreclosed by our precedent,
which holds that such consent is not required. See Southern
California Edison Co. v. Rice, 685 F.2d 354, 356–57 & n.5
(9th Cir. 1982); Nicodemus v. Washington Water Power Co.,
264 F.2d 614, 617–18 (9th Cir. 1959). The Purdys rely on
United States v. Pend Oreille County Public Utility District
No. 1, 135 F.3d 602 (9th Cir. 1998), but that case is
14    STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES

distinguishable. The condemning authority there sought to
condemn both tribal reservation land and individual Indian
allotments by flooding the lands through construction of a
dam. Id. at 606, 607. Because the reservation land could not
be condemned under § 357 (only the individual allotments
could), we held that the condemning authority needed the
consent of the United States to proceed. 135 F.3d at 613–14.
This case, by contrast, like Rice and Nicodemus, involves an
attempt to condemn only individual allotments, so express
consent by the United States is not required. See Rice,
685 F.2d at 357; Nicodemus, 264 F.2d at 617–18.

    Although the district court had subject matter jurisdiction
to hear the State’s condemnation claim, that claim may not
proceed as pleaded. The State has alleged a “confirm-and-
condemn” claim that asks the district court first to “confirm”
the extent of the rights-of-way it already owns under R.S.
2477. The State then asserts that it will condemn only those
portions of the four trails it does not already own. The State
may not plead the claim in this manner. Because the State’s
claim under the QTA is barred, it may not litigate title to the
contested rights-of-way through the back door by asserting a
condemnation claim under § 357. See Match-E-Be-Nash-
She-Wish Band v. Patchak, 132 S. Ct. 2199, 2205 (2012). If
the State wishes to condemn the contested rights-of-way in
full and pay just compensation for their taking, it must make
that intention clear. We vacate the district court’s dismissal
of the State’s condemnation claim and remand the case so
     STATE OF ALASKA DEP’T OF NAT. RES. V. UNITED STATES   15

that the State may be given an opportunity to amend that
claim, if it so chooses.

  AFFIRMED in part, VACATED in part, and
REMANDED.

   The parties shall bear their own costs.
