Boston city councilors have introduced a new transfer tax on property sales — a funding source they say would raise hundreds of millions each year to boost the construction of affordable housing.

The proposal from East Boston City Councilor Lydia Edwards would allow the city to place a tax of up to 6 percent on all real estate transactions over $2 million.

Edwards opened a hearing on the initiative at City Hall Tuesday saying despite an array of city programs to build affordable housing, more funding is needed.

“The resources aren’t there to fully maximize all of those programs to the extent that we need to be sure that this city is affordable,” Edwards said. “We are struggling to keep people in our communities."

The proposal would also look to discourage house-flipping, with an up to 25 percent tax on properties sold more than once within a two-year period.

Edwards’ real estate transfer tax was met with stiff opposition by representatives of the region’s real estate interests.

Real estate agent Melvin Vieira argued the tax could hurt the people it’s aiming to help.

"The homebuilder, the flipper who you’re trying to get money out of, [they] really are not going to be affected,” Vieira said. “They will learn how to avoid or work the system, and they’ll make up the difference by passing the 6 percent down to the little man.”

Mark Stewart, a commercial real estate broker at the firm Savills in Boston, said the new tax would only apply to 4 percent of residential transactions. On the flip side, he said, nearly every commercial transaction would be subject to the tax.

“The inevitable result … will be to chill the market … depriving people of business opportunities and jobs,” Stewart said.

Boston would not be the first city to implement a real estate transaction tax. For instance, for sales above $500,000 in New York City, residential deals face a 1.4 percent tax, while commercial deals pay 2.6 percent. (Edwards aide Joel Wool said New York real estate deals face additional fees that don't exist in Boston, and that city officials are revisiting the rates of the transfer tax, which was set in 1989.)

Also testifying at the hearing was Boston housing chief Sheila Dillon. She defended the rate of construction under a mayor pushing for 69,000 new units by the year 2030, saying the city is spending about $50 million annually to preserve and create affordable housing.

"We could always do more, we are limited by our budgets, but there are no projects coming in to us right now that we feel we can't fund because we don't have the money," Dillon said. "No one would disagree that we could do more if we had more resources."

Despite the increase in construction in recent years, housing advocates say the city isn’t acting with enough urgency to avert what they describe as a displacement crisis. Roxbury City Councilor Kim Janey asked Dillon how much money would be required to fully address the city’s housing shortage.

“I don’t know if we’ve ever done the calculation,” Dillon replied. "It’s such a large number. ... It’s more certainly than we have funding for.”

Janey responded that it’s a number the city should have: "If we're doing something that's not informed by what we actually need to have in our city, then we're kind of just spinning our wheels."

Edwards' real estate transfer tax would multiply the amount of money the city spends annually on affordable housing. Her office estimates that a 6 percent tax would have yielded the city over $1.1 billion over the last three years. On the residential side, the tax would've applied to fewer than 500 houses that sold in 2018 for over $2 million, as well as 82 commercial and five industrial properties.

If the City Council passes the measure, the transfer tax would require approval by Mayor Marty Walsh and then would go to the state Legislature — and that bar could be difficult to cross, given the failure of another home rule petition from Boston, the Jim Brooks Community Stabilization Act.

Housing advocates cite the lobbying resources of the real estate industry as a Goliath-sized foe that can only be countered with a statewide grassroots movement.

Mike Leyba, development director of the housing justice nonprofit City Life/Vida Urbana, said he’s optimistic that will happen.

"In the last year we’ve seen the tide shift on legislators realizing there’s a housing and displacement crisis,” Leyba said. “Even at the State House you’d be hard pressed to find someone that says there’s no housing crisis.”

The difficult question, Leyba said, is how to address that crisis.