Walsh and city attorneys had argued that the planned glass tower on the Mystic River would exacerbate traffic in nearby Charlestown and that the state Gaming Commission had acted improperly in awarding a license to Wynn Resorts. Judge Janet L. Sanders disagreed, appearing to take issue with the city's complaint and its "irrelevant detail and hyperbole."

"It's worth it," Walsh told reporters during a brief encounter at City Hall. "I'm fighting on behalf of the people of Boston. I'm not going to roll over and not fight for the people of Boston."

Mayor Martin J. Walsh, after taking a rhetorical beating from a judge who threw out his administration's effort to block an Everett casino, signaled willingness Friday to continue pressing a cause that has cost taxpayers $1.25 million in legal fees.


For Walsh, there is a political upside in the face of apparent judicial mockery: He has positioned himself as the unrelenting defender of his city's neighborhoods — particularly Charlestown — against monied casino interests.

But Walsh's legal setback furnishes the latest reminder that, nearly a decade after it landed on the public docket, the casino issue has a tendency to take a chunk out of many of the politicians who dare touch it, from whichever angle.

"No one who has seen the casino experiments in other states can be surprised that some of our local moths have gotten burned too close to the casino flames," said David Guarino, a senior partner at Melwood Global who, in a string of positions, has worked to stop expanded gambling.

Then-governor Deval Patrick unfurled his three-casino plan in 2007, disappointing many anti-gambling liberals who had supported his candidacy in 2006. But Patrick was facing a cratering state budget and was desperate for jobs, and frequently downplayed gambling's centrality to his agenda.

Then-House speaker Salvatore F. DiMasi fought Patrick's proposal fiercely, and there are still those close to DiMasi who believe his intransigence encouraged the campaign that landed him in federal prison on corruption convictions.


His successor, Robert A. DeLeo, suffered a humiliating defeat in 2010, staking an enormous amount of political capital against Patrick, against the advice of some of his deputies, over slot parlors. Patrick signed the law in 2011.

Of Beacon Hill's current power trio, only Senate President Stanley C. Rosenberg has championed casinos and thrived as a result, serving as the chamber's point man on the issue and chief author of the Senate bill.

Governor Charlie Baker has taken a relatively hands-off approach, similar to his tack around the since-aborted Olympics proposal.

"Those navigating this well have, on principle or for politics, [kept] some distance and a healthy dose of skepticism about casinos as some kind of magical economic engine or force for good," said Guarino, who advised Attorney General Maura Healey during her campaign last year, when she ran as an anticasino candidate, and was a DiMasi aide.

Walsh has done anything but maintain distance, waging a legal and public relations fight with casino magnate Steve Wynn, who is planning the $1.7 billion casino.

In her ruling, Sanders chided Boston and its lawyers for "inflammatory descriptions," "spurious" claims and "hyperbole" that "tend only to obscure the factual allegations."

The one count not dismissed by Sanders was a claim made by Mohegan Sun that it has the right to appeal the commission's rejection of its application. A Mohegan Sun spokesman said it would "pursue our claims aggressively."


Walsh said he had not read the decision, but planned to scrutinize it before determining how to proceed, including whether to appeal.

The mayor said city officials will continue to meet with Wynn representatives and that the two sides have had "good dialogue," noting that inflammatory public rhetoric has subsided.

In Everett, Mayor Carlo DeMaria called the judge's ruling another positive step for his city, saying the casino would produce roughly 4,000 construction jobs, and 4,000 permanent jobs when it opens.

Doubts about promised economic benefits have troubled casino backers before; discredited job-creation projections helped doom Patrick's proposal in his fight with DiMasi. "The casinos promise all this revenue, and they come in and you end up with all of these different complications, and I think that's what's happened," said Dan Bosley, who worked with DiMasi in the House to block Patrick's proposal in 2008.

Walsh, though, appears to have opted to wield a blunt political meat ax in the face of the legal and economic complexities. And he has shown little inclination to abandon that strategy.

Sean P. Murphy of the Globe staff contributed to this report. Jim O'Sullivan can be reached at jim.osullivan@globe.com. Follow him on Twitter @JOSreports.