After a lengthy partisan debate, the Massachusetts state senate yesterday afternoon approved special legislation to create public housing banks on Martha's Vineyard and Nantucket.

But with a only a month left in the legislative term and a gubernatorial veto expected, the controversial bill - which would tax some real estate transactions to fund affordable housing initiatives - still faces on uphill battle on Beacon Hill.

Cape and Islands Sen. Robert O'Leary, a co-sponsor of the legislation who led the debate yesterday, remained optimistic despite the challenges ahead. The bill has only a few weeks to make it through the house of representatives, and opponents successfully delayed a vote on the senate floor for nearly a month.

The senate voted 23-14 yesterday, with eight Democrats crossing the aisle to join all six Republican senators in opposing the bill.

"Delays are problematic under any circumstances, and we're fairly deep into the session here, so you don't want to lose time if you can," Senator O'Leary said in a telephone interview yesterday after the vote. "But we've still got time to move this bill, and time to override a governor's veto if we can get it out of the house," he continued.

"There is still time to make this a law."

Voters in all six Vineyard towns approved the housing bank concept in a nonbinding ballot initiative last spring, and, if enacted by the state, the proposal would still require another round of support by Island voters. The Vineyard and Nantucket housing banks would be distinctly separate entities, and neither the dissolution nor the failure to adopt one would affect the other.

Rep. Eric T. Turkington of Falmouth, whose district includes both Islands, praised his senate colleague for the progress he made on the controversial bill this year. But he said candidly that the show is over unless he can get the legislation out of the house and onto the desk of Gov. Mitt Romney, a Republican, by July 20. The governor has ten days to consider a bill, and, if he vetoes it, both chambers must take a roll call vote to override it. The legislative term ends July 31.

"The people who oppose this bill have the ability to run out the clock, so to speak, and that's what we're up against," said Representative Turkington, who was on Nantucket yesterday speaking with housing advocates.

"But today's the day to celebrate its success in the senate," he continued. "And we'll hope to match it in the house."

Island housing advocates reacted to the senate approval yesterday with cautious excitement.

"It's a major step in the right direction," said Emily Levett, executive director of the Island Affordable Housing Fund. "Hopefully we will begin to have the funding resources we need to be able to solve the affordable housing crisis that we have out here."

Debate in the senate yesterday was much longer and more passionate than those typically generated by home rule petitions. Any new tax has the potential to be explosive, Senator O'Leary said, but this one attracted additional attention because the Massachusetts Association of Realtors made its opposition to the bill a priority for the year. Some senators picked up on concerns voiced by the association that the transfer tax structure could set a precedent and eventually spread to the mainland.

Modeled after the Island land banks, the housing bank would generate funding for affordable housing projects by taxing real estate buyers one percent of their transaction price. The first $750,000 of the purchase price would be exempt on the Vineyard, and the first $2 million would be exempt on Nantucket.

Housing bank advocates estimate that the housing bank would generate roughly $2 million per year for Vineyard affordable housing projects. Like the land bank, housing bank funds would be administered by a central elected commission and six appointed town advisory boards.

Sen. Richard Tisei, Republican of Wakefield and a real estate agent who owns a home in Edgartown, specifically opposed the transfer tax structure. A State House News Service transcript of the senate session captured the debate.

"I love Martha's Vineyard . . . and clearly affordable housing is a problem. [But] the solution that's been brought before this legislature isn't the right solution, and it singles out a very small number of people rather than everybody chipping in and addressing the crisis as a community," said Senator Tisei, who noted that the seller-paid transfer fee will likely be passed on to the buyer. "Think how crazy this sounds: We're going to make housing less affordable on Martha's Vineyard so we can have more affordable housing on Martha's Vineyard. It doesn't make any sense."

Sen. Michael R. Knapik, Republican of Westfield, repeated an argument he made during a joint revenue committee hearing on the bill this winter, when he suggested the state should be looking at the affordable housing issue across the commonwealth, and not enacting special legislation for the Islands.

"This is a thorny, nettlesome issue, and I think we'd be making a grave mistake in allowing a portion of the commonwealth a piecemeal solution," said Senator Knapik. "We all have a crisis in affordable housing. We all have an inability to keep the families in our district. This will catch on like a prairie fire."

Sen. Harriet Chandler, Democrat of Worcester, had a different view. And she, like many of the senators who spoke against the bill, praised Senator O'Leary for his determination in seeing this legislation through.

"Basically what we're talking about is the survival of Nantucket and Martha's Vineyard. There are no other municipalities in all of Massachusetts that look like [those Islands]," said Senator Chandler, who added that she would support a similar option for her own district. "I ask that my colleagues look at the facts, vote with [Senator O'Leary], and give the people from those communities the future they desire."