In his annual State of the City address earlier this year, Boston Mayor Marty Walsh announced a new, big-ticket housing agenda to thundering applause.

Walsh has pledged to spend $500 million over the next five years on a raft of housing programs aimed at creating and preserving affordable housing, including housing for seniors, low-income and middle-income Bostonians.

The plan, if carried out, would represent something like a four-fold increase in city spending for housing.

But it came with one big catch: To pay for the program, Walsh is counting heavily on Boston's implementing a transfer tax on high-end real estate sales in the city.

And in order to implement that tax, the city needs permission from the state – specifically, the state legislature would have to approve a home rule petition, passed by Boston’s City Council and signed by Mayor Walsh last year.

While the details still have to be worked out, even a two percent fee applied only to property sales over $2 million, could bring in tens of millions annually in extra revenue, according to a city study – thanks largely to the white hot real luxury residential and high-end commercial real estate market that has yet to show signs of significantly slowing down.

Other nearby cities and towns find themselves in similar situations – strapped for funds to pay for affordable housing, while watching high-end property sell at, seemingly, ever-escalating prices.

And Boston is not the first city to try this: Other cities and towns have sent similar home rule petitions to Beacon Hill in recent years, often after robust local debate, only to see them languish in committees until they died quiet bureaucratic deaths with no legislative action.

But Boston is the biggest city to try, and now a battle is shaping up over something bigger than any one transfer tax: the boundaries and limitations of municipalities power to govern themselves, the decades-old construct in Massachusetts known as “Home Rule.”

Affordable housing advocates and activists have rallied around Boston’s home rule petition.

Boston City Councilor Lydia Edwards, who first introduced the transfer tax petition in the City Council, has made the case that Boston shouldn't need permission to raise its own funds to solve its own problems.

“The fact that our policies are contingent on somebody else in another city, another county, basically determining whether the ideas we come up with can pass, is basically a slap in the face,” noted Boston City Councilor Lydia Edwards at a rally in favor of the measure earlier this year.

“Every community doesn’t have the same kind of burden – but those other communities that don’t have the same burden,” of an overheated real estate market and a population that increasingly can’t afford it, Edwards said.

“Boston should be able to do its own thing.”

And Boston is hardly alone. Some half dozen cities and towns facing similar affordability crises - including Brookline, Concord, Nantucket – are pushing for transfer taxes to help pay for affordable housing too.

And all face the same conundrum: The fact that Massachusetts “Home Rule” laws serve in many ways to restrict, rather than empower local governments – especially when it comes to local taxation.

“In Massachusetts while technically people talk about home rule, there’s not really a lot of local flexibility without getting permission from the state first,” says Geoffrey Beckwith, of the Massachusetts Municipal Association.

His group doesn’t take positions on individual home rule petitions, but it supports more flexibility in general for Massachusetts towns and cities, which, Beckwith argues, allows local governments to do what they do best.

“Local leaders are looking for tools to solve local problems,” says Beckwith. “That’s a way of solving problems before they spread and they grow to become even more difficult and more entrenched.”

The point, and the debate around it, are not new.

A 2004 report from the Harvard Kennedy School’s Rappaport Institute, titled “Dispelling the myth of home rule,” argued that Massachusetts laws purportedly meant to empower local communities in many cases functioned to do the opposite.

“Home rule lurks behind every important concern of Greater Boston,” wrote the paper’s authors. “But contrary to the myth of home rule, local authority is restricted. Localities have little discretion over taxes, fees, and borrowing.”

But there are strong voices on other side of this debate, too, especially the state’s influential real estate industry groups, which have consistently opposed local transfer fees.

“Our home rule tradition is sort of in the fabric of Massachusetts,” said Greg Vasil, President and CEO of the Greater Boston Real Estate Board.

“There’s this strong tradition of Cities and towns feel and want the ability to govern themselves – and in some ways it creates chaos.”

Vasil agreed there’s an affordability crisis in Boston.

But he argued, as have of other real estate industry groups, that a transfer tax won't solve that crisis.

Vasil argued that Boston already requires developers, in many cases, to build affordable housing or contribute to a city housing fund; and pointed out that his group supports the Community Preservation Act, which imposes a one percent property tax surcharge to pay for various community goods, including affordable housing, in many communities, including Boston.

But Vasil also argued that allowing municipalities to decide themselves would open the floodgates to a hodgepodge of new taxes.

“Should our tax policy on this be delegated to cities and towns? We don’t think so,” said. Vasil.

But the number of cities and towns pushing for similar measures is growing.

Ellen Schachter, director of the Office of Housing Stability for Somerville – which has now twice sent a home rule petition for a transfer tax to Beacon Hil -- has been helping organize a coalition of cities and towns lobbying the state legislature for enabling legislation that would let any city or town to enact its own transfer tax, within limits, that passes locally.

Doing so, Schachter argued, simply enables communities to solve their own problems – without having to add to the state’s legislative burdens.

“We’re not asking [the legislature] for any funds to make this happen,” Schachter emphasized. we’re not asking you to do statewide regulation, we’re asking, ‘un-handcuff us!’”

“It’s not a need just for one or two municipalities, it’s a need for a growing number [of communities] around the state” Schachter said. “So enabling legislation is really the answer.”

State representative Mike Connolly, of Somerville, has co-sponsored a bill that would do just that – allow any Massachusetts town or city to implement a limited transfer tax, if it passes local muster.

The effort is already facing stiff opposition – particularly from real estate groups.

But Connolly says that one message he’s trying to convey to the real estate community is that if they refuse to compromise on this, they might be even less pleased with affordable housing measures down the road.

“One of the things I’m saying to them is the movement for rent control is also growing around the country and also in Massachusetts,” Connolly said, “so it really would be in your interest, real estate community, to want to come to the table.”

“Because if this housing emergency gets worse and worse than the response is going to be even more, you know, severe."