San Jose’s bid to lure the Oakland A’s to a downtown ballpark continues to take a beating in the courts.

A Santa Clara County judge recently handed the city a setback, ruling last month that city officials violated local laws by entering into a land-purchase agreement with the team for a ballpark site without first putting the issue to the voters. Superior Court Judge Joseph Huber sided with a citizens’ group, Stand for San Jose, which sued to block the city’s option agreement with the A’s.

The judge’s ruling invalidates the latest version of the deal between San Jose and the A’s, which was put in place last year. It also creates yet another obstacle to the city’s increasingly longshot odds of bringing the A’s to Silicon Valley.

The City Council on Tuesday voted to appeal Huber’s decision.

San Jose already has suffered a series of setbacks in its primary legal fight with Major League Baseball over baseball’s refusal to allow the A’s to move to the South Bay. The move has been blocked by the San Francisco Giants, who’ve asserted territorial rights to the South Bay. San Jose argues that MLB has violated federal antitrust laws by blocking the move, but a federal appeals court last year rejected those claims.

The city last month asked the U.S. Supreme Court to take up the case, considered unlikely by most legal experts.

San Jose City Attorney Rick Doyle said city officials do not believe that the state case involving the option agreement will have any bearing on the Supreme Court outcome, noting that San Jose always planned on conducting a local vote on the pact if MLB approval for an A’s move ever materialized.

In the meantime, Oakland city leaders are trying to keep the A’s in Oakland with various proposals for a ballpark in the city. A’s owner Lew Wolff has opposed San Jose’s antitrust case, saying he is focused for now on keeping the team in Oakland.

Howard Mintz covers legal affairs. Contact him at 408-286-0236 or follow him at Twitter.com/hmintz.