In a major victory for New York City, a state appeals panel yesterday held that the court no longer has jurisdiction to enforce a historic agreement requiring the city to provide services to mentally ill inmates after they are released from jail.

At issue was whether the lower court had the authority to rule on a preliminary injunction motion made last year by the plaintiffs, a group of inmates from city jails, to continue enforcing the 2003 settlement in Brad H. v. City of New York.