PHOENIX - Repeatedly rebuffed in court, the state and multiple Indian tribes are banking on federal legislation to block the Tohono O'odham Nation from building a casino on the edge of Glendale.

The measure introduced Tuesday by Republican U.S. Rep. Trent Franks would block any tribe that acquired new trust lands from building a casino in Maricopa or Pinal counties until at least 2027.

Franks' legislation mentions no names. But its wording - and the lobbyist for the Gila River Indian Community who asked for it - make it clear the goal is to ensure that a fourth casino the O'odham Nation is entitled to build will go only in Pima County.

At the same time Tuesday, attorneys for the state and other tribes were in federal court asking U.S. District Judge David Campbell to bar the O'odham casino. They contend the initiative approved by voters in 2002 allowing for tribal gaming never was intended to allow the Tucson-area tribe to have a casino so far from its base. They cite language in the initiative limiting gaming to existing reservations.

But the initiative itself has an escape clause: It allows casinos on lands tribes acquire as part of the settlement of a land claim. The property the O'odham Nation acquired in Glendale settled a claim the tribe had against the federal government for damages to the reservation caused by a dam, though there is some legal dispute over that.

Franks' bill would pull the rug out from under the O'odham efforts and make whatever Campbell rules irrelevant. It also would block until 2027 any other tribe's efforts to improve its finances by building a casino in the Phoenix area.

The fight traces its roots to a federal dam project that flooded the 10,000-acre San Lucy District of the reservation. As compensation, the 1986 law gave the tribe $30 million, which it could use to buy land anywhere in Pima, Pinal or Maricopa counties and eventually have it become part of the reservation. The tribe bought a parcel on the edge of Glendale in 2003.