Boston Mayor Michelle Wu traveled to the State House Tuesday to make the case for a new 2-percent tax on most real-estate transactions in excess of $2 million, which the city can only implement if the state Legislature gives its blessing and the proposal becomes law.

Wu told the state Legislature’s Joint Committee on Revenue that the tax, which would be paid by sellers and only apply to funds that exceed $2 million, would affect a small portion of real-estate transactions in the city.

“Based on numbers from 2021, this would generate up to $100 million in local revenue to tackle our housing crisis, and would have only affected about 700 property sales in the entire city out of nearly 10,000 transactions, so about ... 7 percent affected,” Wu said.

The bill had many supporters from local government and local nonprofits, who say the extra funds are needed for programs that help Bostonians obtain and keep affordable housing. But some from the real-estate industry argued it is the wrong way to go about increasing city revenue, and that it would dampen housing production and have other adverse effects.

Wu preemptively pushed back on the idea that the tax would make it more difficult or desirable for developers to build in Boston.

“This is not about increasing upfront costs,” she said. “This is not about adding to the burden as developers are looking to cobble together the permitting costs . ... This is adding a very small transaction fee at the point of sale, when the resources are there, to be able to make a huge impact across our city.”

Like Wu, Sheila Dillon, Boston’s housing chief, argued that too many Bostonians are being pushed to the brink by high housing costs. She pointed to a long list of applicants looking to live in the city’s public housing.

“The Boston Housing Authority list exceeds 40,000 households ... and many of these households are families with children in our public schools,” Dillon said. "And on any given night we have a thousand individuals living in our shelters or on our streets. And we know that many households that were hanging on ... they've really suffered economic consequences due to the pandemic, and are no longer able to do so.”

Dillon directly challenged Gov. Charlie Baker's suggestion that Boston's recent infusion of federal COVID-relief funds should render the proposed tax unnecessary.

“Our housing budget ... would double, and this funding would be available to us year after year,” Dillon said. “And while it’s so great to have new federal funding, and the governor has mentioned it, it is one-time funding. We need revenue sources that are available to us year in, year out, as we plan our way out of this crisis.”

The bill that would cement the proposed transfer tax would exempt real-estate transactions between family members. It also would make more elderly Bostonians eligible for the state’s Senior Homeowner Property Tax Exemption, and increase the amount of relief seniors can receive.

State Rep. Brandy Fluker Oakley (D-Boston), the bill’s lead sponsor, said the legislation would help many longtime Bostonians stay in the neighborhoods where they grew up, and that communities of color in particular would benefit.

"It would prevent members of communities like mine from being priced out of the housing market and being displaced from neighborhoods where they have lived for decades," Fluker Oakley said.

Those arguments were echoed throughout the hearing the bill’s supporters, including Mark Draisen, the executive director of the Metropolitan Area Planning Council; Lydia Lowe, the director of the Chinatown Community Land Trust; and Marley Frederique, a senior organizer at the Boston Tenant Coalition.

Support for the proposal was not unanimous, however.

Patricia Baumer, the Greater Boston Real Estate Board’s director of government affairs, said Boston could use the existing Community Preservation Act more aggressively to provide new funding for affordable housing.

That mechanism, which Bostonians voted to adopt in 2016, currently imposes a 1-percent surtax on residential and commercial property-tax bills, with the money allocated for affordable housing, open space and other uses.

Under existing state law, Baumer said, that surtax could be raised as high as 3 percent, and Boston could be earmarking more of its existing CPA revenues for affordable housing than it currently does.

“[The CPA] was created because it is a stable source of revenue, unlike a real-estate transfer tax,” Baumer said. “Times are good now, but 2008 wasn't that long ago. The market itself is a very volatile source of revenue. The market goes up and the market goes down.”

Dawn Ruffini, the president of the Massachusetts Association of Realtors, said the proposed transfer tax reflects a fundamental misdiagnosis of what ails the state’s housing market.

“The current housing crisis does not derive from a lack of funding, but rather a lack of housing production,” she said.

Ruffini also predicted that, if Boston’s transfer tax becomes a reality, it will make it harder to find a home in the city and “increase income stratification [while] constraining diversity and inclusivity, thereby enforcing preexisting patterns of de facto segregation.”

“Transfer taxes will harm our communities,” she said.

The Legislature’s Joint Committee on Revenue currently has a June 31 deadline to take some form of action on the bill.