Marty Walsh has turned the casino licensing process into the biggest poker game in town. Does the mayor have the cards to win, or is he bluffing?

Since taking office in January, Walsh has been pestering the state gaming commission for more time to study the impact of a casino on Boston. Now he wants host community status, even though neither of the two proposals for the Greater Boston license are actually in the city.

When it looked like he had a shaky case, Walsh lashed out, asserting this week that the commission doesn’t even have the authority to decide who gets the host community label, which entitles communities to a big annual payout for the headache of putting up with a casino.

Walsh really doesn’t have a choice here — he has to put up a good fight. Whether the gaming license goes to Mohegan Sun in Revere or Wynn Resorts in Everett, Boston will be the biggest loser. Because both casino proposals are on the Boston border, the city will grapple with all the downsides of a host community — such as traffic and crime — but without reaping the full benefits of one. The difference could be millions of dollars a year between being a host community versus a surrounding community.

But if Walsh gets his way and wins the more powerful host community status, that means the neighborhoods of East Boston and Charlestown will need to vote on it. East Boston already rejected a casino in its backyard at Suffolk Downs, and I can’t see residents changing their minds. And Charlestown? Residents there are all gentrified now — even Steve Wynn’s $1.6 billion monument to gambling wouldn’t be good enough for them.

So if Walsh wins, the casino loses. Is that what he really wants?

As a state representative from Dorchester, he supported the gaming legislation. As the former head of the Boston building trades, he was all about getting people back to work — a neighborhood vote would put thousands of union construction jobs at risk. And as a champion for economic development, he can’t possibly want to kill the casino.

‘Today if a casino were open [in Everett], the only door to that house is through the city of Boston. And a house without a door is not a casino. Nobody can get in; nobody can get out.’

His endgame seems to be getting as much as leverage as possible to negotiate the most lucrative surrounding community agreement ever to be inked in the history of gaming. True, both casino proposals may be in other cities, but to get to Revere or Everett, you have to go through Boston. That’s where Walsh can make life difficult for casino operators.

This is what the city’s lawyer, Tom Frongillo, told the gaming commission recently: “Today if a casino were open [in Everett], the only door to that house is through the city of Boston. And a house without a door is not a casino. Nobody can get in; nobody can get out.

It all sounds simplistic, but if Walsh’s goal is to cause a ruckus and buy more time, it’s working. Already, the huffing and puffing is likely going to make the commission blow its June 30 deadline for awarding the Boston resort license. That could have consequences for the state budget — which already built in $85 million for that license.

The gaming commission isn’t ready to call Walsh’s bluff. Far from it, the group seems to be bending over backward, giving the city more time to work through its issues on whether it qualifies as a host community. That’s because, if all else fails, the city can fight it out in court, and the last thing anyone wants is to pay more lawyers.

That doesn’t mean the commission likes what Walsh is doing. Certainly, the hiring of Frongillo alone, who has been as approachable as a cactus at meetings, has already rattled the rather unflappable gaming commission chairman Stephen Crosby.

After a series of heated exchanges between the two last week, Crosby barked, “I don’t think that emotion ought to rule the day. And the right thing to do is to ignore some of the obnoxious rhetoric.”

The new mayor of Boston is trying to win the casino game with a pair of deuces. Careful betting against him.