WASHINGTON (AP) — A federal judge on Monday barred the District of Columbia from implementing a law that purported to allow the city to spend its local tax dollars without authorization from Congress.

The city currently adopts its own budget but needs Congress’ approval. In 2013, voters approved the so-called budget autonomy measure to grant the District the right to spend its local tax and fee revenue without Congress’ authorization. It was added to the city charter after Congress didn’t intervene.

But D.C. Mayor Vincent Gray has refused to implement the law, saying he supports budget autonomy but believes Congress must pass a bill to grant it. The 13-member D.C. Council sued as a result.

On Monday, U.S. District Judge Emmet Sullivan sided with Gray, ruling that Congress is the only body that can grant budget autonomy and barring city officials from enforcing the law.

Sullivan wrote in a 47-page opinion that as a native Washingtonian he was “deeply moved” by the “argument that the people of the District are entitled to the right to spend their own, local funds.” But he said the Local Budget Autonomy Act the D.C. Council enacted, Gray signed and residents approved is “unlawful.” It is up to Congress to act, he said.

“Congress has plenary authority over the District, and it is the only entity that can provide budget autonomy,” he wrote.

Lawyers for the D.C. Council filed a court document Monday saying they would appeal Sullivan’s ruling to the U.S. Court of Appeals for the D.C. Circuit.

Gray said in a written statement that he was not surprised by the ruling but he called it “bittersweet, because there is no fiercer advocate for budget autonomy in the District of Columbia than me.”

“As I have said all along, we need to gain the freedom to spend our own money legally. I will continue to advocate forcefully for Congress to grant budget autonomy for the District of Columbia,” he said.