Local residents and other persons and organizations aggrieved by a failure of the State or the Federal Government to provide for the priority for subsistence uses set forth in section
of this title (or with respect to the State as set forth in a State law of general applicability if the State has fulfilled the requirements of section
of this title) may, upon exhaustion of any State or Federal (as appropriate) administrative remedies which may be available, file a civil action in the United States District Court for the District of Alaska to require such actions to be taken as are necessary to provide for the priority. In a civil action filed against the State, the Secretary may be joined as a party to such action. The court may grant preliminary injunctive relief in any civil action if the granting of such relief is appropriate under the facts upon which the action is based. No order granting preliminary relief shall be issued until after an opportunity for hearing. In a civil action filed against the State, the court shall provide relief, other than preliminary relief, by directing the State to submit regulations which satisfy the requirements of section
of this title; when approved by the court, such regulations shall be incorporated as part of the final judicial order, and such order shall be valid only for such period of time as normally provided by State law for the regulations at issue. Local residents and other persons and organizations who are prevailing parties in an action filed pursuant to this section shall be awarded their costs and attorney’s fees.