A federal appeals court ruled Tuesday that Arizona's one-time prison visitor fee that goes toward maintaining state-run lockups is constitutional.

The ruling by a three-judge panel of the state Court of Appeals upholds a trial judge's December 2011 decision that rejected a challenge by prisoner rights advocates.

Arizona implemented the $25 fee in July 2011.

The state said it was for a background check but money from the fee goes for repairs and maintenance of state-run prisons.

People who were approved for visitation prior to the enactment of the being implemented were grandfathered in.

Children under 18, inmates' foster parents and those who want only phone privileges are exempt from payment.